Skip to content

reconnection fixes#564

Closed
mokesmokes wants to merge 4 commits intosocketio:0.9from
mokesmokes:0.9
Closed

reconnection fixes#564
mokesmokes wants to merge 4 commits intosocketio:0.9from
mokesmokes:0.9

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.

2 participants