mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-27 13:14:41 -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() {
|
||||
client.latency = (new Date()) - sendKeepAliveTime;
|
||||
if(sendKeepAliveTime) client.latency = (new Date()) - sendKeepAliveTime;
|
||||
lastKeepAlive = new Date();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user