From 33dacf02db12e4c9b799d56f711a6eab577812c9 Mon Sep 17 00:00:00 2001 From: Zhyren-git Date: Wed, 17 Dec 2025 18:20:55 -0400 Subject: [PATCH] Fixed player getting "Timed out" while standing still due to Keep-Alive not being sent correctly \\ Replaced return with canceling the task (oops). --- src/main/java/com/loohp/limbo/network/ClientConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/loohp/limbo/network/ClientConnection.java b/src/main/java/com/loohp/limbo/network/ClientConnection.java index ff70bc2..d8aa9ec 100644 --- a/src/main/java/com/loohp/limbo/network/ClientConnection.java +++ b/src/main/java/com/loohp/limbo/network/ClientConnection.java @@ -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();} } };