Browse Source

Fix voice websocket not being closed before being replaced

pull/10109/head
Imayhaveborkedit 2 years ago
committed by dolfies
parent
commit
cabca85dd9
  1. 5
      discord/voice_client.py

5
discord/voice_client.py

@ -434,6 +434,11 @@ class VoiceClient(VoiceProtocol):
self.finish_handshake()
self._potentially_reconnecting = False
if self.ws:
_log.debug("Closing existing voice websocket")
await self.ws.close()
try:
self.ws = await self.connect_websocket()
except (ConnectionClosed, asyncio.TimeoutError):

Loading…
Cancel
Save