comparison 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
comparison
equal deleted inserted replaced
1899:d24ef26f1205 1900:55a9d867e3c8
1057 n = ngx_read_channel(c->fd, &ch, sizeof(ngx_channel_t), ev->log); 1057 n = ngx_read_channel(c->fd, &ch, sizeof(ngx_channel_t), ev->log);
1058 1058
1059 ngx_log_debug1(NGX_LOG_DEBUG_CORE, ev->log, 0, "channel: %i", n); 1059 ngx_log_debug1(NGX_LOG_DEBUG_CORE, ev->log, 0, "channel: %i", n);
1060 1060
1061 if (n == NGX_ERROR) { 1061 if (n == NGX_ERROR) {
1062
1063 if (ngx_event_flags & NGX_USE_EPOLL_EVENT) {
1064 ngx_del_conn(c, 0);
1065 }
1066
1062 ngx_close_connection(c); 1067 ngx_close_connection(c);
1063 return; 1068 return;
1064 } 1069 }
1065 1070
1066 if (ngx_event_flags & NGX_USE_EVENTPORT_EVENT) { 1071 if (ngx_event_flags & NGX_USE_EVENTPORT_EVENT) {