Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data lost for accept(true) #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

data lost for accept(true) #8

wants to merge 4 commits into from

Conversation

carck
Copy link

@carck carck commented Aug 6, 2015

calling resume cause data lost before we add data event handler

});
//process.nextTick(function() {
//socket.resume();
//});

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