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

Trying to Reconnect Abnormaly Closed Connection #292

Open
mdben1247 opened this issue Sep 24, 2019 · 0 comments
Open

Trying to Reconnect Abnormaly Closed Connection #292

mdben1247 opened this issue Sep 24, 2019 · 0 comments

Comments

@mdben1247
Copy link

Hello,
I am trying to schedule a reconnect to a websocket server after the connection would be closed abnormally. I figured when receiving handler.on_close() or factor.connection_lost(), I could call sender.connect() method to reconnect. However, I am not sure what to do to reconnect after some time has passed. Using sender.timeout() is of no use, since the handler will be dropped. Sleeping is also no good since it will block the thread. Not sure, maybe I am missing something. Is there some straight forward solution to this 'trying to reconnect every 10s' problem? Thanks.

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