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

Allow further configurability of reconnect: add option maxReconnectionDelay #226

Closed
wants to merge 351 commits into from

Conversation

frzme
Copy link

@frzme frzme commented May 27, 2011

It is often desirable to not go beyond a certain point when exponentially scaling the reconnection delay especially when working with a high number of reconnection attempts. For most applications the reconnectionDelay becomes too large when it exeeds a day or so, quite a lot will want a lower delay.
I added an option "maxReconnectionDelay" which caps the reconnection delay to the configured value. The default value is -1 which means no limit.

I also added the possible value -1 to maxReconnectionAttempts meaning unlimited reconnection attempts which works nicely with capping the reconnection delay.

rauchg and others added 30 commits July 29, 2010 10:37
Simplified chat example to take advantage of JSON encoding/decoding
Removed fs sync call from example
…eSafari (fixes #29 and potentially creationix issue)
Fixed WebSocket location header for ws/wss (Thanks @jdub, Fixes #40)
… privileges (thanks @wink for inspiration)

Removed clients/clientsIndex and only using the index (fixes #28)
Added clientsIndex reference for BC
@frzme
Copy link
Author

frzme commented May 28, 2011

On second thought I could probably use Number.POSITIVE_INFINITY for maxReconnectionAttempts which would make commit 419e559 obsolete, thoughts on that?

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.