Mercurial > hg > nginx-vendor-current
diff src/event/ngx_event_accept.c @ 44:4989c3d25945 NGINX_0_1_22
nginx 0.1.22
*) Bugfix: the ngx_http_stub_status_module showed incorrect handled
connections statistics if the proxying or FastCGI server were used.
*) Bugfix: the installation paths were incorrectly quoted on Linux and
Solaris; bug appeared in 0.1.21.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 22 Feb 2005 00:00:00 +0300 |
parents | 41ccba1aba45 |
children | 72eb30262aac |
line wrap: on
line diff
--- a/src/event/ngx_event_accept.c +++ b/src/event/ngx_event_accept.c @@ -118,6 +118,7 @@ ngx_event_accept(ngx_event_t *ev) #if (NGX_STAT_STUB) ngx_atomic_inc(ngx_stat_accepted); + ngx_atomic_inc(ngx_stat_active); #endif ngx_accept_disabled = (ngx_uint_t) s + NGX_ACCEPT_THRESHOLD @@ -138,10 +139,6 @@ ngx_event_accept(ngx_event_t *ev) return; } -#if (NGX_STAT_STUB) - ngx_atomic_inc(ngx_stat_active); -#endif - /* set a blocking mode for aio and non-blocking mode for others */ if (ngx_inherited_nonblocking) { @@ -263,6 +260,10 @@ ngx_event_accept(ngx_event_t *ev) c->number = ngx_atomic_inc(ngx_connection_counter); +#if (NGX_STAT_STUB) + ngx_atomic_inc(ngx_stat_handled); +#endif + #if (NGX_THREADS) rev->lock = &c->lock; wev->lock = &c->lock; @@ -452,6 +453,10 @@ ngx_close_accepted_socket(ngx_socket_t s ngx_log_error(NGX_LOG_ALERT, log, ngx_socket_errno, ngx_close_socket_n " failed"); } + +#if (NGX_STAT_STUB) + ngx_atomic_dec(ngx_stat_active); +#endif }