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

TCPStream close causes another socket to be created #7

Open
bpytlik opened this issue Feb 11, 2014 · 0 comments
Open

TCPStream close causes another socket to be created #7

bpytlik opened this issue Feb 11, 2014 · 0 comments

Comments

@bpytlik
Copy link

bpytlik commented Feb 11, 2014

What I'm observing is that after I close a TCPStream, I see at least one more attempt to connect a socket that looks like the TCPStream socket.

I think this is what happens, when you close a TCPStream, on line 102, we call socket.end. That causes a close event to trigger. Because of line 85, that sets a timeout for 1s later where we'll create a new socket.

I think the solution is to remove the listeners to the socket before closing it, at least the listeners that are created in tcp.js.

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

No branches or pull requests

1 participant