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

reconnection fixes #564

Closed
wants to merge 4 commits into from
Closed

reconnection fixes #564

wants to merge 4 commits into from

Conversation

mokesmokes
Copy link

This commit fixes two issues with reconnections:

  1. The reconnection delay is meaningless if the handshake is not replied. Previously, it was often the case that the socket would go into "reconnecting", but no further reconnection attempts would be made since frequently the handshake XHR would not return (most often observed with websocket connections when the server restarts). This fix provides a handshake timeout that is a bit shorter than the reconnection delay, so further reconnection attempts can actually take place. Note that this fix only affects browsers with XMLHttpRequest - i.e. Chrome, FF, IE10+, etc.
  2. socket.disconnect() on the client side was not respected if called while the socket was in the reconnecting state. Fixed.
  3. reconnect_failed event will be fired after max reconnection attempts failed, see reconnect_failed gets never fired socket.io#652 (comment)
  4. Fix to actually make it max reconnection attempts (it was originally off by 1)

This pull request was closed.
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.

None yet

2 participants