diff --git a/doc/README.md b/doc/README.md index a023bde..1b28c24 100644 --- a/doc/README.md +++ b/doc/README.md @@ -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 diff --git a/src/client/keepalive.js b/src/client/keepalive.js index 17f212f..2c46b7e 100644 --- a/src/client/keepalive.js +++ b/src/client/keepalive.js @@ -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);