aboutsummaryrefslogtreecommitdiff
path: root/discord/state.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-04-18 19:05:34 -0400
committerRapptz <[email protected]>2017-04-18 19:05:34 -0400
commitf9c2ac9d25fe65a99bf92b60002920b20fe55c1d (patch)
tree21d922c8ff36e8e7e2b8e066cef9c3868fe11502 /discord/state.py
parentFix FFmpegPCMAudio not working with spaces in filename. (diff)
downloaddiscord.py-f9c2ac9d25fe65a99bf92b60002920b20fe55c1d.tar.xz
discord.py-f9c2ac9d25fe65a99bf92b60002920b20fe55c1d.zip
Better handling of VOICE_SERVER_UPDATE.
This now sort of respects "Awaiting Endpoint..." waiting. I haven't actually tested out this case since it's hard to get it. However this new code does work with the regular connection flow.
Diffstat (limited to 'discord/state.py')
-rw-r--r--discord/state.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/state.py b/discord/state.py
index 10f6d16e..1a2f9b98 100644
--- a/discord/state.py
+++ b/discord/state.py
@@ -695,8 +695,8 @@ class ConnectionState:
key_id = int(data['channel_id'])
vc = self._get_voice_client(key_id)
- if vc is not None and vc.is_connected():
- compat.create_task(vc._switch_regions())
+ if vc is not None:
+ compat.create_task(vc._create_socket(key_id, data))
def parse_typing_start(self, data):
channel = self.get_channel(int(data['channel_id']))