mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-10 10:41:00 +00:00
Handle I/O timout type errors from autopause mc-monitor call (#2606)
This commit is contained in:
1 parent
ca393c4fcf
commit
b73fb88b3b
1 file changed
+3
-1
@@ -24,7 +24,9 @@ java_clients_connections() {
|
|||||||
local connections
|
local connections
|
||||||
if java_running ; then
|
if java_running ; then
|
||||||
if ! connections=$(mc-monitor status --host localhost --port "$SERVER_PORT" --show-player-count); 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
|
fi
|
||||||
else
|
else
|
||||||
connections=0
|
connections=0
|
||||||
|
|||||||
Reference in new issue
Block a user