From b73fb88b3b1d98115cddcc2ec34235848adad323 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 20 Jan 2024 19:07:58 -0600 Subject: [PATCH] Handle I/O timout type errors from autopause mc-monitor call (#2606) --- files/auto/autopause-fcns.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/auto/autopause-fcns.sh b/files/auto/autopause-fcns.sh index 975227cd..7a40cca7 100644 --- a/files/auto/autopause-fcns.sh +++ b/files/auto/autopause-fcns.sh @@ -24,7 +24,9 @@ java_clients_connections() { local connections if java_running ; then if ! connections=$(mc-monitor status --host localhost --port "$SERVER_PORT" --show-player-count); then - connections=0 + # consider it a non-zero player count if the ping fails + # otherwise a laggy server with players connected could get paused + connections=1 fi else connections=0