+ added EPOLLERR and EPOLLHUP handling + fix root substitution for default "/" location (temp or permanent ?) + tested siege a little, seems good
19 lines
366 B
C++
19 lines
366 B
C++
|
|
#include "Webserv.hpp"
|
|
|
|
void Webserv::_timeout()
|
|
{
|
|
std::cerr << "_timeout()\n";
|
|
std::vector<Client>::iterator it = _clients.begin();
|
|
while (it != _clients.end())
|
|
{
|
|
if (!it->request_complete)
|
|
{
|
|
std::cerr << "timeout request fd " << it->get_cl_fd() << "\n";
|
|
it->status = 408;
|
|
_epoll_update(it->get_cl_fd(), EPOLLOUT, EPOLL_CTL_MOD);
|
|
}
|
|
++it;
|
|
}
|
|
}
|