-
Notifications
You must be signed in to change notification settings - Fork 10
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
Websocket doesn't re-subscribe upon disconnect #24
Comments
Have changed the coding to use Websockets and Asyncio so this is not needed now. If you know how to get the V2 websocket working that would be good - can get it to connect and login but get an error when trying to subscribe even though followed the subscription format exactly. |
It would be nice to show how you changed the Websocket code, since I also have the problem, that once the connection is lost because the webserver of Bitget are overloaded, it is not re-connecting anymore. This is how it looks when entered the death spiral, not recovering anymore.
|
Hi Builds on what you had already done but I am not trading using the websocket so not logging in. Thanks class BitgetWsClient:
|
Thanks for your great work on this.
The websocket re-connects on a disconnect but doesn't seem to re-subscribe to channels.
2024-02-14 04:48:48.092 | ERROR | pybitget.stream:__on_error:235 - Connection to remote host was lost.
2024-02-14 04:48:48.093 | INFO | pybitget.stream:__re_connect:252 - start reconnection ...
2024-02-14 04:48:48.095 | INFO | pybitget.stream:__on_close:241 - ws is closeing ......close_status:None,close_msg:None
2024-02-14 04:48:49.505 | INFO | pybitget.stream:__on_open:179 - connection is success....
2024-02-14 04:48:49.566 | INFO | pybitget.stream:__on_open:179 - connection is success....
I have edited stream.py as below in to close the connection and then wait in case it needs time until properly logged in before trying to re-subscribe
Could ideally do with the script catching KeyboardException (I have tried to implement within stream.py but isn't error free) and a close and reconnect if no messages received for a period of time.
Thanks
The text was updated successfully, but these errors were encountered: