From b396686c6d2a200b074ef1b80303d342989a66c1 Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Fri, 12 Feb 2016 14:49:33 +0100 Subject: [PATCH] use correct timeout default values (see http://wiki.vg/Protocol#Keep_Alive), fix #341 --- src/client/keepalive.js | 2 +- src/createServer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/keepalive.js b/src/client/keepalive.js index fae0017..0eab56e 100644 --- a/src/client/keepalive.js +++ b/src/client/keepalive.js @@ -2,7 +2,7 @@ module.exports = function(client, options) { const keepAlive = options.keepAlive == null ? true : options.keepAlive; if (!keepAlive) return; - const checkTimeoutInterval = options.checkTimeoutInterval || 10 * 1000; + const checkTimeoutInterval = options.checkTimeoutInterval || 20 * 1000; client.on('keep_alive', onKeepAlive); diff --git a/src/createServer.js b/src/createServer.js index aaf0dd6..c93e740 100644 --- a/src/createServer.js +++ b/src/createServer.js @@ -17,7 +17,7 @@ function createServer(options) { options['server-port'] : 25565; const host = options.host || '0.0.0.0'; - const kickTimeout = options.kickTimeout || 10 * 1000; + const kickTimeout = options.kickTimeout || 30 * 1000; const checkTimeoutInterval = options.checkTimeoutInterval || 4 * 1000; const onlineMode = options['online-mode'] == null ? true : options['online-mode']; // a function receiving the default status object and the client