Add statuses, status messages

This commit is contained in:
Lion Kortlepel
2021-12-06 13:17:54 +01:00
parent 0f74eca2ee
commit a1335e8c7d
13 changed files with 126 additions and 24 deletions

View File

@@ -264,6 +264,7 @@ void Http::Server::SetupEnvironment() {
}
Http::Server::THttpServerInstance::THttpServerInstance() {
Application::SetSubsystemStatus("HTTPServer", Application::Status::Starting);
mThread = std::thread(&Http::Server::THttpServerInstance::operator(), this);
mThread.detach();
}
@@ -279,5 +280,6 @@ void Http::Server::THttpServerInstance::operator()() {
res.set_content("0", "text/plain");
res.status = 200;
});
Application::SetSubsystemStatus("HTTPServer", Application::Status::Good);
HttpLibServerInstance.listen("0.0.0.0", Application::Settings.HTTPServerPort);
}