Skip to content

data lost for accept(true)#8

Open
carck wants to merge 4 commits intomscdex:masterfrom
carck:master
Open

data lost for accept(true)#8
carck wants to merge 4 commits intomscdex:masterfrom
carck:master

Conversation

@carck
Copy link
Copy Markdown

@carck carck commented Aug 6, 2015

calling resume cause data lost before we add data event handler

Comment thread lib/server.js
});
//process.nextTick(function() {
//socket.resume();
//});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you set up a listener socket.on('data', ...) right after calling accept(true)?

If not, you can pause the socket again with:

socket = accept(true);
process.nextTick(function() {
  socket.pause();
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants