Open ZacharyTalis opened 3 years ago
This seems to be related to Javacord/Javacord#627, the simplest way I see to detect this is to see how long its been since DiscordApi#getLatestGatewayLatency
was updated indicating time since the last heartbeat and restarting the bot if that exceeds some threshold. To be extra sure I would say if it exceeds 5 seconds. Maybe more.
May eventually fix this so notes:
Pacemaker
that checks that the DiscordApi
heart is beating via checking against #getLatestGatewayLatency
and disconnect and reconnect the bot
DiscordBot
interface to support a simple stop-then-start reconnect after a short delay
Issue: Bot was online but unresponsive, with the following message repeatedly appearing in the log:
[Javacord - Central Scheduler - 1] DEBUG org.javacord.core.util.gateway.Heart - Heartbeat not answered properly. This might be because of a busy websocket
The bot responded normally upon restart.
Proposed solution: (Somehow) detect that this issue has occurred, and restart the bot's container.