avoid endless loop if epoll is used

This commit is contained in:
Igor Sysoev 2008-02-19 16:30:54 +00:00
parent 5fe93ee95f
commit bb7c84159f

View File

@ -1059,6 +1059,11 @@ ngx_channel_handler(ngx_event_t *ev)
ngx_log_debug1(NGX_LOG_DEBUG_CORE, ev->log, 0, "channel: %i", n);
if (n == NGX_ERROR) {
if (ngx_event_flags & NGX_USE_EPOLL_EVENT) {
ngx_del_conn(c, 0);
}
ngx_close_connection(c);
return;
}