Skip to content

Commit

Permalink
Server: Start health checker after generating the planet
Browse files Browse the repository at this point in the history
  • Loading branch information
SirLynix committed Dec 13, 2024
1 parent 86c0811 commit dd4be71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ int ServerMain(int argc, char* argv[])

auto& config = configAppComponent.GetConfig();

if (Nz::UInt32 maxStuckTime = config.GetIntegerValue<Nz::UInt32>("Server.MaxStuckSeconds"))
app.AddComponent<tsom::HealthCheckerAppComponent>(maxStuckTime);

Nz::UInt16 serverPort = config.GetIntegerValue<Nz::UInt16>("Server.Port");
std::filesystem::path saveDirectory = Nz::Utf8Path(config.GetStringValue("Save.Directory"));

Expand All @@ -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<Nz::UInt32>("Server.MaxStuckSeconds"))
app.AddComponent<tsom::HealthCheckerAppComponent>(maxStuckTime);

return app.Run();
}

Expand Down

0 comments on commit dd4be71

Please sign in to comment.