Closed jbaumgarten closed 1 year ago
can confirm, happens with me too
That specefically looks like an issue at startup, could you please share some test code/test case?
For anyone interested, the cause of this seems to be the gateway closing at an inopportune time, causing the interaction wait_for()
(which usually wouldn't take more than 3 seconds) to timeout while the gateway RESUMEs. I've increased the timeout (and caught the right TimeoutError
(oops)) to account for this edge-case.
The actual solution to this would be eliminating the bad/blocking code or network problem that causes the gateway to reconnect as often as it is in these issues.
For anyone interested, the cause of this seems to be the gateway closing at an inopportune time, causing the interaction
wait_for()
(which usually wouldn't take more than 3 seconds) to timeout while the gateway RESUMEs. I've increased the timeout (and caught the rightTimeoutError
(oops)) to account for this edge-case.The actual solution to this would be eliminating the bad/blocking code or network problem that causes the gateway to reconnect as often as it is in these issues.
Hi guy, thx for your change. I fogot to update the issue but in my case, I had a sleep in my code which was not using asyncio library. Once I changed it to use asyncio.sleep, I had less gateway disconnect/reconnect :)
Summary
When I am using a slash command, it is successfully executed but it generates a timeout which stop the bot
Reproduction Steps
First create a client self-bot Then execute a slash command
Code
No response
Expected Results
The slash command should be executed without any exception
Actual Results
(testdiscord) root@vm5-18:~# python -m discord -v
Checklist
Additional Information
No response