diff src/os/unix/ngx_process_cycle.c @ 1900:55a9d867e3c8

avoid endless loop if epoll is used
author Igor Sysoev <igor@sysoev.ru>
date Tue, 19 Feb 2008 16:30:54 +0000
parents e584e946e198
children 0cafbfd8112e
line wrap: on
line diff
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -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;
     }