mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-29 06:03:33 -04:00
fix small bug that made the latency be NaN sometimes
This commit is contained in:
parent
78c3820de0
commit
dd06a7075e
@ -74,7 +74,7 @@ function createServer(options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onKeepAlive() {
|
function onKeepAlive() {
|
||||||
client.latency = (new Date()) - sendKeepAliveTime;
|
if(sendKeepAliveTime) client.latency = (new Date()) - sendKeepAliveTime;
|
||||||
lastKeepAlive = new Date();
|
lastKeepAlive = new Date();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user