Mercurial > hg > nginx
comparison src/event/ngx_event_accept.c @ 323:ba876b26b76d
nginx-0.0.3-2004-04-21-22:54:33 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 21 Apr 2004 18:54:33 +0000 |
parents | 39b6f2df45c0 |
children | 55e496a8ece3 |
comparison
equal
deleted
inserted
replaced
322:ab2f8c9a2a45 | 323:ba876b26b76d |
---|---|
123 | 123 |
124 ngx_destroy_pool(pool); | 124 ngx_destroy_pool(pool); |
125 return; | 125 return; |
126 } | 126 } |
127 | 127 |
128 | |
129 ngx_accept_disabled = (ngx_uint_t) s + NGX_ACCEPT_THRESHOLD | |
130 - ecf->connections; | |
131 | |
128 /* disable warning: Win32 SOCKET is u_int while UNIX socket is int */ | 132 /* disable warning: Win32 SOCKET is u_int while UNIX socket is int */ |
129 | 133 |
130 if ((unsigned) s >= (unsigned) ecf->connections) { | 134 if ((ngx_uint_t) s >= ecf->connections) { |
131 | 135 |
132 ngx_log_error(NGX_LOG_ALERT, ev->log, 0, | 136 ngx_log_error(NGX_LOG_ALERT, ev->log, 0, |
133 "accept() on %s returned socket #%d while " | 137 "accept() on %s returned socket #%d while " |
134 "only %d connections was configured, " | 138 "only %d connections was configured, " |
135 "closing the connection", | 139 "closing the connection", |
137 | 141 |
138 if (ngx_close_socket(s) == -1) { | 142 if (ngx_close_socket(s) == -1) { |
139 ngx_log_error(NGX_LOG_ALERT, log, ngx_socket_errno, | 143 ngx_log_error(NGX_LOG_ALERT, log, ngx_socket_errno, |
140 ngx_close_socket_n "failed"); | 144 ngx_close_socket_n "failed"); |
141 } | 145 } |
142 | |
143 /* TODO: disable temporary accept() event */ | |
144 | 146 |
145 ngx_destroy_pool(pool); | 147 ngx_destroy_pool(pool); |
146 return; | 148 return; |
147 } | 149 } |
148 | 150 |