Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Reconnection limit not properly checked and reconnect_failed event not fired #472

jaycetde opened this Issue · 1 comment

3 participants


Line 559 in socket.js tests self.reconnectionDelay prior to doubling its value.

Say the initial delay is 500, and the reconnection limit is set to 6000.
With the exponential back off of *= 2, we will see the following steps:
500, 1000, 2000, 4000, 8000.
However, with the test done prior to the exponential multiplication, it verifies that 4000 < 6000, then sets the reconnectionDelay to 8000.

I do not receive a 'reconnect_failed' event when the connection is first lost in either Chrome 22.0.1229.79 m or Firefox 13.0.1 (did not test any additional browser).
I do receive the event after I specifically call socket.reconnect();

I noticed that although I set the 'max reconnection attempts' = 5, 6 attempts are actually attempted with the last one failing to fire a 'reconnecting' event. This last attempt seems to have the same reconnectionDelay as the previous attempt. ( Again, this is only on losing the first connection. It will only fire the 5 times after calling socket.reconnect(); )


@JayceTDE, #516 will help you with the 'reconnect_failed' issue.

@rauchg rauchg closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.