mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-20 07:39:48 +00:00
Fix RESUME handling and make sure to wait 5 seconds before attempting.
This commit is contained in:
@@ -347,12 +347,14 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol):
|
||||
return
|
||||
|
||||
if op == self.INVALIDATE_SESSION:
|
||||
state.sequence = None
|
||||
state.session_id = None
|
||||
if data == True:
|
||||
yield from asyncio.sleep(5.0, loop=self.loop)
|
||||
yield from self.close()
|
||||
raise ResumeWebSocket()
|
||||
|
||||
state.sequence = None
|
||||
state.session_id = None
|
||||
|
||||
yield from self.identify()
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user