parent
0fcd385b9a
commit
a425bd91be
@ -70,7 +70,7 @@ class KeepAliveHandler(threading.Thread):
|
|||||||
while not self._stop_ev.wait(self.interval):
|
while not self._stop_ev.wait(self.interval):
|
||||||
if self._last_ack + self.heartbeat_timeout < time.monotonic():
|
if self._last_ack + self.heartbeat_timeout < time.monotonic():
|
||||||
log.warn("Shard ID %s has stopped responding to the gateway. Closing and restarting." % self.shard_id)
|
log.warn("Shard ID %s has stopped responding to the gateway. Closing and restarting." % self.shard_id)
|
||||||
coro = self.ws.close(1006)
|
coro = self.ws.close(4000)
|
||||||
f = compat.run_coroutine_threadsafe(coro, loop=self.ws.loop)
|
f = compat.run_coroutine_threadsafe(coro, loop=self.ws.loop)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -190,7 +190,7 @@ class VoiceClient:
|
|||||||
if self._handshake_complete.is_set():
|
if self._handshake_complete.is_set():
|
||||||
# terminate the websocket and handle the reconnect loop if necessary.
|
# terminate the websocket and handle the reconnect loop if necessary.
|
||||||
self._handshake_complete.clear()
|
self._handshake_complete.clear()
|
||||||
yield from self.ws.close(1006)
|
yield from self.ws.close(4000)
|
||||||
return
|
return
|
||||||
|
|
||||||
self._handshake_complete.set()
|
self._handshake_complete.set()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user