comments and tweaks

This commit is contained in:
Aaron Kimbre
2025-01-15 14:59:30 -06:00
parent 5b8fe2cba0
commit 9542216650
3 changed files with 6 additions and 7 deletions

View File

@@ -76,7 +76,6 @@ int main(int argc, char** argv) {
Game::assetManager = new AssetManager(clientPath);
} catch (std::runtime_error& ex) {
LOG("Got an error while setting up assets: %s", ex.what());
delete Game::server;
delete Game::logger;
delete Game::config;
return EXIT_FAILURE;
@@ -88,18 +87,18 @@ int main(int argc, char** argv) {
} catch (std::exception& ex) {
LOG("Got an error while connecting to the database: %s", ex.what());
Database::Destroy("ChatServer");
delete Game::server;
delete Game::logger;
delete Game::config;
return EXIT_FAILURE;
}
// seyup the chat api web server
bool web_server_enabled = Game::config->GetValue("web_server_enabled") == "1";
ChatWebAPI chatwebapi;
if (web_server_enabled && !chatwebapi.Startup()){
// if we want the web api and it fails to start, exit
LOG("Failed to start web server, shutting down.");
Database::Destroy("ChatServer");
delete Game::server;
delete Game::logger;
delete Game::config;
return EXIT_FAILURE;