mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
Increase checkoutTimeoutInterval default to 30s
Fix https://github.com/PrismarineJS/mineflayer/issues/644
This commit is contained in:
parent
6b109aa4d8
commit
a29d7f151a
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue