From 4b1857f48d5667c2e81a5d40c8564db39f330b4c Mon Sep 17 00:00:00 2001 From: timvisee Date: Mon, 30 Jan 2023 17:57:49 +0100 Subject: [PATCH] Don't disable process freeze in config on Windows, simply ignore setting --- res/lazymc.toml | 2 +- src/config.rs | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/res/lazymc.toml b/res/lazymc.toml index 15050f6..cd3e327 100644 --- a/res/lazymc.toml +++ b/res/lazymc.toml @@ -34,7 +34,7 @@ directory = "." command = "java -Xmx1G -Xms1G -jar server.jar --nogui" # Freeze the server process instead of restarting it when no players online, making it resume faster. -# Only works on Unix (Linux or MacOS) +# Only works on Unix (Linux or MacOS), ignored on Windows #freeze_process = true # Immediately wake server when starting lazymc. diff --git a/src/config.rs b/src/config.rs index 74f997d..3ab1949 100644 --- a/src/config.rs +++ b/src/config.rs @@ -57,13 +57,6 @@ pub fn load(matches: &ArgMatches) -> Config { } }; - // TODO better way to do this - #[cfg(windows)] - { - // Don't try to use unix APIs on windows - config.server.freeze_process = false; - } - config }