Sanity: reset ping ID after getting the right KeepAlive

This commit is contained in:
Andrew Steinborn
2018-09-22 20:38:59 -04:00
parent 9e999e1e5a
commit 6c61aa49f3
2 changed files with 5 additions and 0 deletions

View File

@@ -208,4 +208,8 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
this.lastPingId = lastPingId;
this.lastPingSent = System.currentTimeMillis();
}
public void resetLastPingId() {
this.lastPingId = -1;
}
}

View File

@@ -69,6 +69,7 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
}
player.setPing(System.currentTimeMillis() - serverConnection.getLastPingSent());
serverConnection.getMinecraftConnection().write(packet);
serverConnection.resetLastPingId();
return;
}