Better timeout handling in join_voice_channel

This commit is contained in:
cookkkie 2017-03-13 02:25:10 +01:00
parent 38ea40f403
commit 2f159098b1

View File

@ -3185,9 +3185,9 @@ class Client:
try:
session_id_data = yield from asyncio.wait_for(session_id_future, timeout=10.0, loop=self.loop)
data = yield from asyncio.wait_for(voice_data_future, timeout=10.0, loop=self.loop)
except asyncio.TimeoutError:
except asyncio.TimeoutError as e:
yield from self.ws.voice_state(server.id, None, self_mute=True)
return None
raise e
kwargs = {
'user': self.user,