-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Many connections left in readyState 2 #64
Comments
Is this problem in socket.io as well? |
As @einaros already mentioned, especially in the handshake sequence, the error handling in This is what I observed – some connections being stuck in readyState 2, so I added the (quite radical but effective) solution with |
Thanks for bumping this again. I'll deal with it today. |
I've made quite a few changes now - could you try the current master and see if that improves things on your end? |
Are there any chances that the fixes you put into the WS library can make there way into the websocket parsers you wrote for socket.io?? |
I would prefer that socket.io soon made the switch to use websocket.io. Websocket.io uses the ws parsers internally. |
@einaros I'll update one of the servers tomorrow, looks good! |
@nicokaiser I included a similar fix in WebSocketServer, and pushed v0.4.15. Hopefully this will improve things for you this following week. |
@einaros ok, great! I installed ws 0.4.15 (default settings, this time also with default node.js without any nocrankshaft noopt switches), let's see how it behaves. |
Eagerly awaiting the results :) Hopefully things will be at least a little bit better. |
Where do we stand on this now? Does the latest connection shutdown fixes deal with this? |
Did not have problems for some weeks now. So considering this as fixed now. |
After running for some hours, there are quite some connections with readyState 2 (
WebSocket.CLOSING
). They are never closed, even after some minutes (socket timeouts).This may be the result of a client never reacting to
close
packets.I agree that
socket.end
is nicer thansocket.destroy
, but there must be some kind of timer that destroys a connection that isCLOSING
for too long. This gets even worse when the connection is ended because of handshake failures – then, the connection is invisible for the application (not emitted asconnection
event) and dangling around forever.The text was updated successfully, but these errors were encountered: