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.
This commit is contained in:
Rapptz
2017-04-18 19:05:34 -04:00
parent b4bc4dfd12
commit f9c2ac9d25
3 changed files with 34 additions and 29 deletions

View File

@ -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']))