From f9c2ac9d25fe65a99bf92b60002920b20fe55c1d Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 18 Apr 2017 19:05:34 -0400 Subject: 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. --- discord/state.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'discord/state.py') 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'])) -- cgit v1.2.3