diff options
| author | Rapptz <[email protected]> | 2017-08-08 21:12:04 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-08-08 21:12:04 -0400 |
| commit | de65f7309bc8f8c931f29dcd76ebd9e8b0ee547b (patch) | |
| tree | 31d5e4e151f6757c677aa854cfa70f644635df00 /discord/client.py | |
| parent | Add DiscordWebSocket.latency to measure discord heartbeat latency. (diff) | |
| download | discord.py-de65f7309bc8f8c931f29dcd76ebd9e8b0ee547b.tar.xz discord.py-de65f7309bc8f8c931f29dcd76ebd9e8b0ee547b.zip | |
Add heartbeat_timeout to the Client options.
This setting configures how long before a timeout event is emitted
internally and disconnects the websocket. Since some users were
experiencing issues with the gateway not responding, this should help
mitigate the issue for those with poor PCs.
Diffstat (limited to 'discord/client.py')
| -rw-r--r-- | discord/client.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py index 25fd5bb7..a310c3de 100644 --- a/discord/client.py +++ b/discord/client.py @@ -95,6 +95,11 @@ class Client: A game to start your presence with upon logging on to Discord. status: Optional[:class:`Status`] A status to start your presence with upon logging on to Discord. + heartbeat_timeout: float + The maximum numbers of seconds before timing out and restarting the + WebSocket in the case of not receiving a HEARTBEAT_ACK. Useful if + processing the initial packets take too long to the point of disconnecting + you. The default timeout is 60 seconds. Attributes ----------- |