Sanity: reset ping ID after getting the right KeepAlive
This commit is contained in:
@@ -208,4 +208,8 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
|||||||
this.lastPingId = lastPingId;
|
this.lastPingId = lastPingId;
|
||||||
this.lastPingSent = System.currentTimeMillis();
|
this.lastPingSent = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void resetLastPingId() {
|
||||||
|
this.lastPingId = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -69,6 +69,7 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
}
|
}
|
||||||
player.setPing(System.currentTimeMillis() - serverConnection.getLastPingSent());
|
player.setPing(System.currentTimeMillis() - serverConnection.getLastPingSent());
|
||||||
serverConnection.getMinecraftConnection().write(packet);
|
serverConnection.getMinecraftConnection().write(packet);
|
||||||
|
serverConnection.resetLastPingId();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user