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
The problem is that if the websocket disconnects (which can happen randomly, sometimes after a few hours), it will treat it as if it exited successfully (because it exits with signal 0 if it disconnects) and will not restart the service. If I then the Restart property to always, it would then making shutting down the bot using commands not possible as the init system will restart it afterwards.
The Ideal Solution
There should be a logic in the client where if the websocket was to disconnect, it will attempt to re-establish a connection to the websocket, just like discord.py.
The Current Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered:
While I do plan to look into this in the future, it's probably going to have to wait until a proper rewrite. As a temporary solution however, you could try to wrap the bot starting code in a loop. If a disconnect also returns some specific error you can try to catch that in the loop and only restart then to reduce "scuff"
Summary
Client should reconnect itself when it disconnects from the websocket
What is the feature request for?
The core library
The Problem
I have a systemd user service that starts up my bot on system startup, as follows:
The problem is that if the websocket disconnects (which can happen randomly, sometimes after a few hours), it will treat it as if it exited successfully (because it exits with signal 0 if it disconnects) and will not restart the service. If I then the
Restart
property toalways
, it would then making shutting down the bot using commands not possible as the init system will restart it afterwards.The Ideal Solution
There should be a logic in the client where if the websocket was to disconnect, it will attempt to re-establish a connection to the websocket, just like discord.py.
The Current Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: