mirror of https://github.com/LOOHP/Limbo.git
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:
commit
c6d6089f8d
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue