mirror of
https://github.com/LOOHP/Limbo.git
synced 2026-06-07 13:31:43 +00:00
Merge pull request #53 from tadhunt/fix-issue-51
A fix for Incorrect Payload Received in KeepAlive packet for player <XXX>
This commit is contained in:
@@ -613,8 +613,11 @@ public class ClientConnection extends Thread {
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user