DiscordBot icon indicating copy to clipboard operation
DiscordBot copied to clipboard

[RFC] Supporting auto-reconnect to discord gateway

Open GameParrot opened this issue 1 year ago • 1 comments

The bot has been terminating with InternalThread.ERROR: websocket error {"e":"Unable to read from stream: stream_get_contents(): SSL: Connection reset by peer"} [] appearing in the log. Is this a bug in the bot or just unstable network? If its network instability could the bot autoreconnect without having to restart the entire server?

GameParrot avatar Jun 13 '24 02:06 GameParrot

I'm going to assume unstable network.

In terms of the auto-reconnect its a bit of a shady area as to what to do, there are indeed many options like auto reconnecting but that would create problems with what to do during that gap eg if a plugin tries sending a message or is waiting on one during that gap it would never work.

Welcome to other ways to support reconnecting but it requires a lot more thought and structure into the plugin before that can be done.

JaxkDev avatar Jul 22 '24 14:07 JaxkDev