sleepy-discord
sleepy-discord copied to clipboard
Endless reconnects
I don't know whos bug this is but ill mention it here for the time being. After 8 days of uptime I encountered an issue where the bot tried to connect to Discord 1000 times in a short amount of time. Calling onReady a 1000 times, thus Discord revoked my token.
I'm aware of this issue. It has happened to be me a few times already. I don't exactly know why it's happening and I've been making changes that I think would fix it. However, there's currently no way for me to know if it's fixed or not without having to wait at least a week for it to happen.
On Visual Studio you could try a hit counter breakpoint that breaks after like 500 reconnects.
The bot that use that runs for a week is using Ubuntu. I can use GDB to do it, but that would still require me to wait for it happen.
Is this it? lol
yea that looks like the issue
I think it happened to everyone who uses my software and your library at the exact same time which as 13:00 PDT today.
hmm really? that's very useful info to know.
This was my method to detect it but then I figured out everytime it reconnects it doesn't invoke onReady
Know any function that'll be invoked on each reconnect?
@Brandantl Yes, onDisconnect should be called or invoked on every reconnect.
I haven't found the root cause, but for now, I'll make it delay reconnects by increasing the time til reconnecting again on each fail and placing a limit on the number of times it can automatically fail reconnecting in a row.