diff --git a/src/Server/main.cpp b/src/Server/main.cpp index 6e11e5b..793619f 100644 --- a/src/Server/main.cpp +++ b/src/Server/main.cpp @@ -44,9 +44,6 @@ int ServerMain(int argc, char* argv[]) auto& config = configAppComponent.GetConfig(); - if (Nz::UInt32 maxStuckTime = config.GetIntegerValue("Server.MaxStuckSeconds")) - app.AddComponent(maxStuckTime); - Nz::UInt16 serverPort = config.GetIntegerValue("Server.Port"); std::filesystem::path saveDirectory = Nz::Utf8Path(config.GetStringValue("Save.Directory")); @@ -64,6 +61,9 @@ int ServerMain(int argc, char* argv[]) fmt::print(fg(fmt::color::lime_green), "server ready.\n"); + if (Nz::UInt32 maxStuckTime = config.GetIntegerValue("Server.MaxStuckSeconds")) + app.AddComponent(maxStuckTime); + return app.Run(); }