mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-15 10:19:59 +00:00
Fix RESUME handling and make sure to wait 5 seconds before attempting.
This commit is contained in:
parent
6dca5035df
commit
a76909e182
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user