mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Check if we're closed before attempting to do a reconnect.
This commit is contained in:
1 parent
a0cdb19c5f
commit
5461bfb475
2 files changed
+5
-1
No files matched your search
@@ -399,6 +399,9 @@ class Client:
|
||||
yield from self.close()
|
||||
raise
|
||||
|
||||
if self.is_closed():
|
||||
return
|
||||
|
||||
# We should only get this when an unhandled close code happens,
|
||||
# such as a clean disconnect (1000) or a bad state (bad token, no sharding, etc)
|
||||
# sometimes, discord sends us 1000 for unknown reasons so we should reconnect
|
||||
|
||||
Reference in new issue
Block a user