Increase checkoutTimeoutInterval default to 30s

Fix https://github.com/PrismarineJS/mineflayer/issues/644
This commit is contained in:
Romain Beaumont 2018-05-01 21:06:20 +02:00
parent 6b109aa4d8
commit a29d7f151a
No known key found for this signature in database
GPG key ID: DB60E388B3BCF286
2 changed files with 2 additions and 2 deletions

View file

@ -78,7 +78,7 @@ Returns a `Client` instance and perform login.
* clientToken : generated if a password is given
* accessToken : generated if a password is given
* keepAlive : send keep alive packets : default to true
* checkTimeoutInterval : default to `10*1000` (10s), check if keepalive received at that period, disconnect otherwise.
* checkTimeoutInterval : default to `30*1000` (30s), check if keepalive received at that period, disconnect otherwise.
* version : 1.8 or 1.9 or false (to auto-negotiate): default to 1.8
* customPackets (optional) : an object index by version/state/direction/name, see client_custom_packet for an example

View file

@ -4,7 +4,7 @@ module.exports = function(client, options) {
const keepAlive = options.keepAlive == null ? true : options.keepAlive;
if (!keepAlive) return;
const checkTimeoutInterval = options.checkTimeoutInterval || 20 * 1000;
const checkTimeoutInterval = options.checkTimeoutInterval || 30 * 1000;
client.on('keep_alive', onKeepAlive);