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.
This commit is contained in:
Rapptz
2017-08-08 21:12:04 -04:00
parent ceafae0ab2
commit de65f7309b
4 changed files with 11 additions and 2 deletions

View File

@ -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
-----------