mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-28 12:58:00 +03:00
fix: exit on SIGINT to avoid leaks
This commit is contained in:
@@ -231,7 +231,11 @@ bool Server::TimeToDie(struct timeval &last_modif, int lifeTime)
|
||||
void sigHandler(int sig)
|
||||
{
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user