Skip to content

Commit

Permalink
Skip shutdown if server is already shutting down
Browse files Browse the repository at this point in the history
  • Loading branch information
4Ply committed Dec 15, 2024
1 parent 00fe42d commit 0ae7fdd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/kotlin/org/trackedout/TaskManagement.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ class TaskManagement(
"shutdown-server-if-empty" -> {
if (server.playerManager.playerList.isEmpty()) {
logger.warn("Shutting down empty server as per dunga-dunga request")
server.shutdown()
if (!server.isStopping) {
server.shutdown()
}
} else {
logger.warn("Server shutdown request ignored as ${server.playerManager.playerList.size} are online")
}
Expand Down

0 comments on commit 0ae7fdd

Please sign in to comment.