-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
Connections remain open despite the client no longer connected #162
Comments
Do you have example code to show what you are doing? Also something that reproduces the issue would be really helpful. |
This sounds similar to #159 |
The 5 second delay on server |
brycekahle
added a commit
that referenced
this issue
Oct 25, 2014
This utilizes the web socket protocol ping-pong op codes. If the connection supports them, it will send them instead of heartbeat frames. If the client doesn’t respond within 10 seconds, it considers the connection closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using the latest NodeJS/npm versions and I have the latest modules installed.
When a client connects and disconnects, for the most part it works perfectly fine. The server is able to detect when a client has left and the close event for that connection is called. If the connection is closed via the server (for example, a user issued a kick command) then it seems to take up to about 5 seconds before it realises the client has been disconnected.
This does not always happen however. When a client disconnects abruptly, the server sometimes is not aware of it. Despite data being written to the socket which is "closed", no errors emit and the close event for that socket connection is never called. When I attempt to "kick" the client, I call "close" on the socket and due to the fact there is no client to receive the data, it is unable to respond to the close request.
The only way I can get the server to remove the connection is to either restart it or modify the code to have it "appear" disconnected to all the other clients however the latter is more of a "quick fix".
Has anyone else experienced issues where the server still thinks a client is connected and never fires the close event on that socket despite requesting to close it?
The text was updated successfully, but these errors were encountered: