diff --git a/discord/voice_client.py b/discord/voice_client.py index a67af9f41..fba2440a2 100644 --- a/discord/voice_client.py +++ b/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):