fix: bound the move-blocking Future.get in RoomUserWalkEvent

roomUnit.getMoveBlockingTask().get() blocked the Netty event loop with no
timeout; a stuck/delayed move-blocking task would park the worker thread (and
every client on it) indefinitely. Wait at most 2s, then proceed with the walk.
This commit is contained in:
simoleo89
2026-06-09 11:28:26 +00:00
parent 1c4449fb88
commit 45d01876c1
@@ -163,7 +163,13 @@ public class RoomUserWalkEvent extends MessageHandler {
} }
if (roomUnit.getMoveBlockingTask() != null) { if (roomUnit.getMoveBlockingTask() != null) {
roomUnit.getMoveBlockingTask().get(); try {
// Bound the wait so a stuck/delayed move-blocking task can't park
// the Netty event loop (and thus every client on it) indefinitely.
roomUnit.getMoveBlockingTask().get(2, java.util.concurrent.TimeUnit.SECONDS);
} catch (java.util.concurrent.TimeoutException | java.util.concurrent.ExecutionException | InterruptedException e) {
// proceed with the walk regardless
}
} }
boolean needsLocationResync = boolean needsLocationResync =