Browse Source

Fix voice websocket not being closed before being replaced

pull/9522/head
Imayhaveborkedit 2 years ago
committed by GitHub
parent
commit
cdc220fa4c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      discord/voice_client.py

5
discord/voice_client.py

@ -421,6 +421,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