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

Is there a way to tell if reconnection attempts are over? #11

Closed
alshakero opened this issue Feb 12, 2018 · 2 comments
Closed

Is there a way to tell if reconnection attempts are over? #11

alshakero opened this issue Feb 12, 2018 · 2 comments

Comments

@alshakero
Copy link

Hi! I loved your lib right away!

I have a question, is there a way to tell if max attempts are reached and it will no longer reconnect? Something like ws.isExhausted or ws.doneTrying? We have HTTP failover in our apps and I would like to only failover after Sockette is exhausted.

If there isn't such a flag I'd be glad to PR.

Cheers

@alshakero alshakero changed the title Is there a way to tell if reconnections trials are over? Is there a way to tell if reconnection attempts are over? Feb 12, 2018
@lukeed
Copy link
Owner

lukeed commented Feb 12, 2018

Hey, thanks! 🙌

Good call -- are you looking for a callback or would a ws.* property be enough? I would think that a callback fits more inline with the rest & is easier to control.

@lukeed
Copy link
Owner

lukeed commented Feb 12, 2018

Closed in 712defb 😄

@lukeed lukeed closed this as completed Feb 12, 2018
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