use correct timeout default values (see http://wiki.vg/Protocol#Keep_Alive), fix #341

This commit is contained in:
Romain Beaumont 2016-02-12 14:49:33 +01:00
parent 9ea3652b6b
commit b396686c6d
2 changed files with 2 additions and 2 deletions

View File

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

View File

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