mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-28 13:45:37 -04:00
use correct timeout default values (see http://wiki.vg/Protocol#Keep_Alive), fix #341
This commit is contained in:
parent
9ea3652b6b
commit
b396686c6d
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user