mirror of https://github.com/LOOHP/Limbo.git
Fixed player getting "Timed out" while standing still due to Keep-Alive not being sent correctly \\ Replaced return with canceling the task (oops).
This commit is contained in:
parent
df47c40998
commit
33dacf02db
|
|
@ -569,14 +569,14 @@ public class ClientConnection extends Thread {
|
|||
keepAliveTask = new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (state != ClientState.PLAY || !ready) return;
|
||||
if (state != ClientState.PLAY || !ready) this.cancel(); // oops
|
||||
|
||||
long now = System.currentTimeMillis();
|
||||
PacketPlayOutKeepAlive keepAlive = new PacketPlayOutKeepAlive(now);
|
||||
try {
|
||||
sendPacket(keepAlive);
|
||||
setLastKeepAlivePayLoad(now);
|
||||
} catch (IOException ignored) {}
|
||||
} catch (IOException ignored) {cancel();}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue