yourWaifu / sleepy-discord

C++ library for the Discord chat client. Please use Rust for new bots
https://yourWaifu.github.io/sleepy-discord/
MIT License
708 stars 93 forks source link

'reconnection to discord' silently stops after 10 attempts #243

Open jpapale opened 2 years ago

jpapale commented 2 years ago

Hello, thanks for the hard work that has been put into this project.

If for some reason the connection is lost, and not recovered within 10 reconnection attempts, the connection is never restored. Commenting the line 'if (consecutiveReconnectsCount == 10) getTheGateway();' seems to fix the problem.

Paket236 commented 2 years ago

Yes, that's an old issue.

I am commenting out the content of this function: void BaseDiscordClient::quit(bool isRestarting, bool isDisconnected) {/**/} it helps too.

It reproduces after 5-6 minutes without an internet connection.