mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Fix voice websocket not being closed before being replaced
This commit is contained in:
parent
0ab68440ee
commit
cdc220fa4c
@ -421,6 +421,11 @@ class VoiceClient(VoiceProtocol):
|
|||||||
|
|
||||||
self.finish_handshake()
|
self.finish_handshake()
|
||||||
self._potentially_reconnecting = False
|
self._potentially_reconnecting = False
|
||||||
|
|
||||||
|
if self.ws:
|
||||||
|
_log.debug("Closing existing voice websocket")
|
||||||
|
await self.ws.close()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.ws = await self.connect_websocket()
|
self.ws = await self.connect_websocket()
|
||||||
except (ConnectionClosed, asyncio.TimeoutError):
|
except (ConnectionClosed, asyncio.TimeoutError):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user