You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
I make one tcp request when user input a line, but the TCP response is usually block until making next a few keystrokes. Tcpdump shows that the response packet has reached the client, but TCP.onread does not fired.
I use node v0.12.2, this is only happen in Mac OSX. Ubuntu is OK
console.log('Type anything then press enter, you should get response from echoServer immediately');console.log('Sometimes TCP.onread may block until you make next keystroke');varnet=require('net');varrl=require('readline').createInterface({input: process.stdin,output: process.stdout,terminal : true,});varsocket=net.createConnection({port : 31017});socket.on('data',function(buf){console.log('=> %s',buf);});rl.on('line',function(line){socket.write(line);}).on('close',function(){socket.end();process.exit(0);});
The text was updated successfully, but these errors were encountered:
I believe is a new bug in Node v0.12 on OSX.
Tested v0.10.36 on OSX, not repo.
v0.12 on Ubuntu, not repo.
rain1017
changed the title
TCP.onread block when working with readline on MacOSX
TCP.onread block when working with readline on v0.12.2 OSX
Jun 9, 2015
I make one tcp request when user input a line, but the TCP response is usually block until making next a few keystrokes. Tcpdump shows that the response packet has reached the client, but TCP.onread does not fired.
I use node v0.12.2, this is only happen in Mac OSX. Ubuntu is OK
echo server
client
The text was updated successfully, but these errors were encountered: