mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 00:07:51 +00:00
Fix voice websocket not being closed before being replaced
This commit is contained in:
parent
506947568c
commit
c5f5f8eb87
@ -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…
x
Reference in New Issue
Block a user