Actually read from the voice websocket & fix heartbeat.

This change makes it so that the buffer doesn't fill and the voice server drops the socket.

Also, use correct interval for voice websocket heartbeat.
This commit is contained in:
Jake committed 2016-06-05 21:18:36 -07:00
1 parent b9c7b05176
commit 41a2b5ed73
2 files changed
+11 -1

No files matched your search

+1 -1
View File
@@ -549,7 +549,7 @@ class DiscordVoiceWebSocket(websockets.client.WebSocketClientProtocol):
data = msg.get('d')
if op == self.READY:
interval = (data['heartbeat_interval'] / 100.0) - 5
interval = data['heartbeat_interval'] / 1000.0
self._keep_alive = VoiceKeepAliveHandler(ws=self, interval=interval)
self._keep_alive.start()
yield from self.initial_connection(data)