mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-28 21:52:17 -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;
|
const keepAlive = options.keepAlive == null ? true : options.keepAlive;
|
||||||
if (!keepAlive) return;
|
if (!keepAlive) return;
|
||||||
|
|
||||||
const checkTimeoutInterval = options.checkTimeoutInterval || 10 * 1000;
|
const checkTimeoutInterval = options.checkTimeoutInterval || 20 * 1000;
|
||||||
|
|
||||||
client.on('keep_alive', onKeepAlive);
|
client.on('keep_alive', onKeepAlive);
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ function createServer(options) {
|
|||||||
options['server-port'] :
|
options['server-port'] :
|
||||||
25565;
|
25565;
|
||||||
const host = options.host || '0.0.0.0';
|
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 checkTimeoutInterval = options.checkTimeoutInterval || 4 * 1000;
|
||||||
const onlineMode = options['online-mode'] == null ? true : options['online-mode'];
|
const onlineMode = options['online-mode'] == null ? true : options['online-mode'];
|
||||||
// a function receiving the default status object and the client
|
// a function receiving the default status object and the client
|
||||||
|
Loading…
x
Reference in New Issue
Block a user