diff options
| author | Jake <[email protected]> | 2016-06-05 20:29:54 -0700 |
|---|---|---|
| committer | Jake <[email protected]> | 2016-06-05 21:18:36 -0700 |
| commit | 41a2b5ed73aa5e39a6cd207a61c1aaaa69b8171e (patch) | |
| tree | 41135e8e5ac36c37daf8f12e4fe7d4400b861498 /discord/gateway.py | |
| parent | [commands] Unify Command.handle_local_error into general dispatcher. (diff) | |
| download | discord.py-41a2b5ed73aa5e39a6cd207a61c1aaaa69b8171e.tar.xz discord.py-41a2b5ed73aa5e39a6cd207a61c1aaaa69b8171e.zip | |
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.
Diffstat (limited to 'discord/gateway.py')
| -rw-r--r-- | discord/gateway.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |