fix zombie discord sessions
This commit is contained in:
parent
e62aeed205
commit
f2e50ebe77
1 changed files with 1 additions and 1 deletions
|
|
@ -323,6 +323,7 @@ class DiscordClient(WebSocketClientProtocol, _BASE_SESSION_CLASS):
|
||||||
reason (str or None): Close reason as sent by the WebSocket peer.
|
reason (str or None): Close reason as sent by the WebSocket peer.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
self.sessionhandler.disconnect(self)
|
||||||
if self.nextHeartbeatCall:
|
if self.nextHeartbeatCall:
|
||||||
self.nextHeartbeatCall.cancel()
|
self.nextHeartbeatCall.cancel()
|
||||||
self.nextHeartbeatCall = None
|
self.nextHeartbeatCall = None
|
||||||
|
|
@ -424,7 +425,6 @@ class DiscordClient(WebSocketClientProtocol, _BASE_SESSION_CLASS):
|
||||||
reason (str or None): Motivation for the disconnection.
|
reason (str or None): Motivation for the disconnection.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.sessionhandler.disconnect(self)
|
|
||||||
self.sendClose(self.CLOSE_STATUS_CODE_NORMAL, reason)
|
self.sendClose(self.CLOSE_STATUS_CODE_NORMAL, reason)
|
||||||
|
|
||||||
def identify(self, *args, **kwargs):
|
def identify(self, *args, **kwargs):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue