nghttpx: Make num_accept 0 on graceful shutdown

Make num_accept unlimited so that we can accept all pending
connections waiting in listen queue.
This commit is contained in:
Tatsuhiro Tsujikawa 2015-01-28 21:02:31 +09:00
parent 19429abd07
commit 96e66b1a81
1 changed files with 4 additions and 0 deletions

View File

@ -426,6 +426,10 @@ void graceful_shutdown_signal_cb(struct ev_loop *loop, ev_signal *w,
// After disabling accepting new connection, disptach incoming // After disabling accepting new connection, disptach incoming
// connection in backlog. // connection in backlog.
// Make num_accept unlimited so that we can accept all connections
// waiting in listen queue.
mod_config()->num_accept = 0;
conn_handler->accept_pending_connection(); conn_handler->accept_pending_connection();
conn_handler->graceful_shutdown_worker(); conn_handler->graceful_shutdown_worker();