aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-04-18 20:13:34 -0400
committerRapptz <[email protected]>2017-04-18 20:13:34 -0400
commitaa32c384eab055ad9e6f14a90ea7c6165616421d (patch)
treeb7fc969dcb289a73a7a91c9d1a4e94bde1a2a287
parentBetter handling of VOICE_SERVER_UPDATE. (diff)
downloaddiscord.py-aa32c384eab055ad9e6f14a90ea7c6165616421d.tar.xz
discord.py-aa32c384eab055ad9e6f14a90ea7c6165616421d.zip
Clean cache when TimeoutError occurs.
-rw-r--r--discord/voice_client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/voice_client.py b/discord/voice_client.py
index 09edfa2e..bf857572 100644
--- a/discord/voice_client.py
+++ b/discord/voice_client.py
@@ -144,7 +144,7 @@ class VoiceClient:
try:
yield from asyncio.wait_for(self._handshake_complete.wait(), timeout=self.timeout, loop=self.loop)
except asyncio.TimeoutError as e:
- yield from ws.voice_state(guild_id, None, self_mute=True)
+ yield from self.terminate_handshake(remove=True)
raise e
log.info('Voice handshake complete. Endpoint found %s (IP: %s)', self.endpoint, self.endpoint_ip)