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

Detect when reconnect_limit is reached #49

Closed
haobole opened this issue Apr 9, 2018 · 2 comments
Closed

Detect when reconnect_limit is reached #49

haobole opened this issue Apr 9, 2018 · 2 comments
Assignees

Comments

@haobole
Copy link

haobole commented Apr 9, 2018

This is not a bug report. This is a request for support. I need to be able to detect when reconnect_limit has been reached so that I can send an email out to alert people that the link to the server has been broken. But I simply have not been able to figure out how to detect this. I've been looking in the context for the disconnected event, but nothing stands out to me. How would I detect this? Thanks.

@grs
Copy link
Member

grs commented Apr 16, 2018

At present there is no way to determine from the disconnected event, or indeed anywhere else, whether the library is still trying to automatically reconnect. The only way to determine that would be to track the failed attempts. This does indeed seem like a bug/limitation of the library and I'll have a think about how to fix it,

@grs grs self-assigned this Apr 16, 2018
@grs grs closed this as completed in 0644399 May 8, 2018
@grs
Copy link
Member

grs commented May 8, 2018

Sorry for the delay. I've made an update that now sets a 'reconnecting' property on the context passed to the disconnected event that is true if the library has scheduled a reconnect attempt and false if it has reached a configured limit.

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

2 participants