mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-22 16:51:59 +00:00
Raise ResumeWebsocket in case of RECONNECT
This commit is contained in:
parent
192f57efef
commit
1cd50919a1
@ -45,10 +45,6 @@ __all__ = [ 'ReconnectWebSocket', 'DiscordWebSocket',
|
||||
'KeepAliveHandler', 'VoiceKeepAliveHandler',
|
||||
'DiscordVoiceWebSocket', 'ResumeWebSocket' ]
|
||||
|
||||
class ReconnectWebSocket(Exception):
|
||||
"""Signals to handle the RECONNECT opcode."""
|
||||
pass
|
||||
|
||||
class ResumeWebSocket(Exception):
|
||||
"""Signals to initialise via RESUME opcode instead of IDENTIFY."""
|
||||
pass
|
||||
@ -339,7 +335,7 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol):
|
||||
# internal exception signalling to reconnect.
|
||||
log.info('Received RECONNECT opcode.')
|
||||
yield from self.close()
|
||||
raise ReconnectWebSocket()
|
||||
raise ResumeWebsocket()
|
||||
|
||||
if op == self.HEARTBEAT_ACK:
|
||||
self._keep_alive.ack()
|
||||
|
Loading…
x
Reference in New Issue
Block a user