mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-30 14:41:27 -04:00
add keepAlive option in createServer
This commit is contained in:
parent
9eeea84e92
commit
1f681ed810
@ -26,6 +26,8 @@ function createServer(options) {
|
||||
// and returning a modified response object.
|
||||
var beforePing = options.beforePing || null;
|
||||
|
||||
var enableKeepAlive = options.keepAlive == null ? true : options.keepAlive;
|
||||
|
||||
var serverKey = ursa.generatePrivateKey(1024);
|
||||
|
||||
var server = new Server(options);
|
||||
@ -194,7 +196,7 @@ function createServer(options) {
|
||||
client.write(0x02, {uuid: client.uuid, username: client.username});
|
||||
client.state = states.PLAY;
|
||||
loggedIn = true;
|
||||
startKeepAlive();
|
||||
if(enableKeepAlive) startKeepAlive();
|
||||
|
||||
clearTimeout(loginKickTimer);
|
||||
loginKickTimer = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user