From 41a2b5ed73aa5e39a6cd207a61c1aaaa69b8171e Mon Sep 17 00:00:00 2001 From: Jake Date: Sun, 5 Jun 2016 20:29:54 -0700 Subject: 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. --- discord/gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'discord/gateway.py') diff --git a/discord/gateway.py b/discord/gateway.py index a569e464..3a81b991 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -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) -- cgit v1.2.3