comparison src/event/ngx_event_accept.c @ 2255:fb7995c7bdd9

dynamic accept threshold
author Igor Sysoev <igor@sysoev.ru>
date Fri, 19 Sep 2008 12:47:13 +0000
parents 5975975eedc0
children 2e91aecb9e57
comparison
equal deleted inserted replaced
2254:353dbe12845e 2255:fb7995c7bdd9
80 80
81 #if (NGX_STAT_STUB) 81 #if (NGX_STAT_STUB)
82 ngx_atomic_fetch_add(ngx_stat_accepted, 1); 82 ngx_atomic_fetch_add(ngx_stat_accepted, 1);
83 #endif 83 #endif
84 84
85 ngx_accept_disabled = NGX_ACCEPT_THRESHOLD 85 ngx_accept_disabled = ngx_cycle->connection_n / 8
86 - ngx_cycle->free_connection_n; 86 - ngx_cycle->free_connection_n;
87 87
88 c = ngx_get_connection(s, ev->log); 88 c = ngx_get_connection(s, ev->log);
89 89
90 if (c == NULL) { 90 if (c == NULL) {