-
Notifications
You must be signed in to change notification settings - Fork 23
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
Reconnect to BitMex if the websocket disconnects #1014
Conversation
I'm wondering why this piece of code would not already work to reconnect to bitmex? I just found this now. |
Ah, even prolonged physical disconnection of my PC's ethernet cable (5min) does not provoke this code to execute. It seems like there is no timeout in place from the client side at all, and sends do not fail either, because we throw away the result of the ping. The way I see it, we can either propagate the error upward, add a timeout, or both. EDIT: it looks like the send doesn't fail... strange. I guess we need to have a timeout then. |
7f055d1
to
5b19d8d
Compare
This is to prevent the websocket from getting stuck if disconnected, as pings will still return Ok(()) even if the link layer fails
5b19d8d
to
fc98e5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in. Thank you.
bors r+ |
bors r- |
Canceled. |
1014: Reconnect to BitMex if the websocket disconnects r=bonomat a=Restioson Adds a timeout to the websocket to bitmex in order to provoke a reconnect if the websocket becomes unresponsive. Fixes #919. Co-authored-by: Restioson <[email protected]>
Adds a timeout to the websocket to bitmex in order to provoke a reconnect if the websocket becomes unresponsive. Fixes #919.