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

Subscriber reconnection on failed auth doesn't back off #29

Closed
jdswinbank opened this issue Jul 4, 2014 · 0 comments
Closed

Subscriber reconnection on failed auth doesn't back off #29

jdswinbank opened this issue Jul 4, 2014 · 0 comments
Assignees

Comments

@jdswinbank
Copy link
Owner

When the subscriber fails to connect to a broker, it uses an exponential back off to avoid a series of rapid-fire reconnections. However, as soon as a connection is made, the timer on that back-off is reset to zero.

If the broker is checking for authenticated subscribers, the connection might be successful but the broker shortly thereafter terminates it when the subscriber fails to authenticate. However, the successful connection has reset the back-off, so the subscriber immediately reconnects and tries to re-authenticate, and so on, ad infinitum.

A smarter approach would be to avoid resetting the back off until a few seconds after the connection has been made to give the remote time to disconnect.

@jdswinbank jdswinbank self-assigned this Jul 4, 2014
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

No branches or pull requests

1 participant