Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fix-issue-54
Browse files Browse the repository at this point in the history
  • Loading branch information
tadhunt committed Sep 29, 2022
2 parents a1ba8fc + c6d6089 commit 4d1fade
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/loohp/limbo/network/ClientConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,11 @@ public void run() {
processMoveEvent.consume(event, to);
}
} else if (packetIn instanceof PacketPlayInKeepAlive) {
long lastPayload = getLastKeepAlivePayLoad();
PacketPlayInKeepAlive alive = (PacketPlayInKeepAlive) packetIn;
if (alive.getPayload() != getLastKeepAlivePayLoad()) {
if (lastPayload == -1) {
Limbo.getInstance().getConsole().sendMessage("Unsolicited KeepAlive packet for player " + player.getName());
} else if (alive.getPayload() != lastPayload) {
Limbo.getInstance().getConsole().sendMessage("Incorrect Payload received in KeepAlive packet for player " + player.getName());
break;
}
Expand Down

0 comments on commit 4d1fade

Please sign in to comment.