clean comment and stuff

This commit is contained in:
lperrey
2022-08-18 12:44:09 +02:00
parent 9b0fcc1520
commit 469eca8aa9
27 changed files with 100 additions and 325 deletions

View File

@@ -18,7 +18,12 @@ void Webserv::_accept_connection(listen_socket &lsocket)
_handle_last_signal();
return ;
}
::fcntl(accepted_fd, F_SETFL, O_NONBLOCK);
if (::fcntl(accepted_fd, F_SETFL, O_NONBLOCK) == -1)
{
std::perror("err fcntl()");
if (::close(accepted_fd) == -1)
std::perror("err close()");
}
infos = _extract_infos(addr);
Client new_client(accepted_fd, &lsocket, infos["port"], infos["ip"]);