-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Socket connects and gets data from non-existing service #2927
Comments
I don't think that's related to node, just that the socket's ephemeral port sooner or later ends up being 4096. |
You mean the application socket is communicating with itself? I captured the network traffic over the local interface and this indeed appears to be happening. The local port of the socket varies until it is the same as the service port. I am surprised that this possible and leads to valid TCP message exchange pattern (SYN, ACK and sequence numbers) that matches the sockets internal state. Agreed this is not related to node. Closing the issue. |
The following program tries to connect to a TCP service on "localhost". I do not have a service running at port 4096, so it continuously gets ECONNREFUSED, as expected. However, if you let it run long enough (a couple of minutes on my machine), eventually it does connect, sends data and even receives data, which appears to be the same data as was send.
Any ideas what is going on?
It seems this only happens with "localhost" and with higher numbered ports For example, it does not show this behaviour when I try and connect to port 7 (which is also not available on my machine).
This is with Node.js v0.12.7 and Linux 2.6.32-504.el6.x86_64.
Example output (last few lines):
The text was updated successfully, but these errors were encountered: