You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: