fix: exit on SIGINT to avoid leaks

This commit is contained in:
3lswear
2022-02-23 22:49:33 +03:00
parent 596bcf7019
commit a6b046a460

View File

@@ -231,7 +231,11 @@ bool Server::TimeToDie(struct timeval &last_modif, int lifeTime)
void sigHandler(int sig) void sigHandler(int sig)
{ {
if (sig == SIGINT) if (sig == SIGINT)
throw ConfigException("SIGINT called. Server shutdown!"); {
std::cerr << "\n";
std::cerr << getDebugTime() << FAIL << "SIGINT called. Server shutdown!" << std::endl;
exit(-1);
}
} }
void Server::run(void) void Server::run(void)