]> git.kaiwu.me - nginx.git/commitdiff
avoid endless loop if epoll is used
authorIgor Sysoev <igor@sysoev.ru>
Tue, 19 Feb 2008 16:30:54 +0000 (16:30 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 19 Feb 2008 16:30:54 +0000 (16:30 +0000)
src/os/unix/ngx_process_cycle.c

index aa95e81d93659a4301cecf1d73d50172012e5c26..96387f04a8411cf0077948dcae31c4a4672c101b 100644 (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;
     }