comparison src/event/ngx_event_accept.c @ 192:31824be1fc66

nginx-0.0.1-2003-11-20-10:05:50 import; auto/configure
author Igor Sysoev <igor@sysoev.ru>
date Thu, 20 Nov 2003 07:05:50 +0000
parents 71ce40b3c37b
children 4a9a2b1dd6fa
comparison
equal deleted inserted replaced
191:71ce40b3c37b 192:31824be1fc66
83 if ((unsigned) s >= (unsigned) ecf->connections) { 83 if ((unsigned) s >= (unsigned) ecf->connections) {
84 84
85 ngx_log_error(NGX_LOG_ALERT, ev->log, 0, 85 ngx_log_error(NGX_LOG_ALERT, ev->log, 0,
86 "accept() on %s returned socket #%d while " 86 "accept() on %s returned socket #%d while "
87 "only %d connections was configured, " 87 "only %d connections was configured, "
88 "sleeping for 1 second", 88 "closing the connection",
89 ls->listening->addr_text.data, s, ecf->connections); 89 ls->listening->addr_text.data, s, ecf->connections);
90 90
91 if (ngx_close_socket(s) == -1) { 91 if (ngx_close_socket(s) == -1) {
92 ngx_log_error(NGX_LOG_ALERT, log, ngx_socket_errno, 92 ngx_log_error(NGX_LOG_ALERT, log, ngx_socket_errno,
93 ngx_close_socket_n "failed"); 93 ngx_close_socket_n "failed");
94 } 94 }
95 95
96 ngx_msleep(1000); 96 /* TODO: disable temporary accept() event */
97 97
98 ngx_destroy_pool(pool); 98 ngx_destroy_pool(pool);
99 return; 99 return;
100 } 100 }
101 101
223 log->data = NULL; 223 log->data = NULL;
224 log->handler = NULL; 224 log->handler = NULL;
225 225
226 ls->listening->handler(c); 226 ls->listening->handler(c);
227 227
228 #if 0
229 if (ngx_event_flags & NGX_HAVE_KQUEUE_EVENT) { 228 if (ngx_event_flags & NGX_HAVE_KQUEUE_EVENT) {
230 ev->available--; 229 ev->available--;
231 } 230 }
232 #endif
233 231
234 accepted++; 232 accepted++;
235 233
236 } while (ev->available); 234 } while (ev->available);
237 235