Skip to content

Commit

Permalink
feat: few arguments crash the service
Browse files Browse the repository at this point in the history
  • Loading branch information
andsfonseca committed Apr 25, 2022
1 parent f7adc22 commit f44ee1c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void resolveDota2GameStateIntegration(std::string host, int port)

if (!found)
{
std::cout << LocalizedStrings::Get("APP:ERRORS:CFG_NOT_FOUND") <<"\n\n";
std::cout << LocalizedStrings::Get("APP:ERRORS:CFG_NOT_FOUND") << "\n\n";
std::cout << "=========== gamestate_integration_rpc.cfg ================\n";
std::cout << cfg_source << "\n";
std::cout << "==========================================================\n\n";
Expand All @@ -141,7 +141,7 @@ void Start()
Extensions::FindAndReplaceAll(listeningMessage, "{{HOST}}", host);
Extensions::FindAndReplaceAll(listeningMessage, "{{PORT}}", std::to_string(port_number));
std::cout << listeningMessage << "\n";
std::cout << LocalizedStrings::Get("APP:INFO:SERVER_HOW_TO_EXIT") <<"\n";
std::cout << LocalizedStrings::Get("APP:INFO:SERVER_HOW_TO_EXIT") << "\n";

// Set HTTP listener address and port
drogon::app().addListener(host, port_number);
Expand Down Expand Up @@ -178,11 +178,11 @@ int main(int argc, const char *argv[])
};

// No option, run sync
if (argc <= 1)
{
const char *args[] = {"", "-f"};
return ServiceMain(2, args, svParam);
}
// if (argc <= 1)
// {
// const char *args[] = {"", "-f"};
// return ServiceMain(2, args, svParam);
// }

return ServiceMain(argc, argv, svParam);
}

0 comments on commit f44ee1c

Please sign in to comment.