mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-15 18:29:52 +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
|
return
|
||||||
|
|
||||||
if op == self.INVALIDATE_SESSION:
|
if op == self.INVALIDATE_SESSION:
|
||||||
state.sequence = None
|
|
||||||
state.session_id = None
|
|
||||||
if data == True:
|
if data == True:
|
||||||
|
yield from asyncio.sleep(5.0, loop=self.loop)
|
||||||
yield from self.close()
|
yield from self.close()
|
||||||
raise ResumeWebSocket()
|
raise ResumeWebSocket()
|
||||||
|
|
||||||
|
state.sequence = None
|
||||||
|
state.session_id = None
|
||||||
|
|
||||||
yield from self.identify()
|
yield from self.identify()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user