diff src/event/ngx_event_accept.c @ 635:18268abd340c release-0.3.39

nginx-0.3.39-RELEASE import *) Feature: the "uninitialized_variable_warn" directive; the logging level of the "uninitialized variable" message was lowered from "alert" to "warn". *) Feature: the "override_charset" directive. *) Change: now if the unknown variable is used in the "echo" and "if expr='$name'" SSI-commands, then the "unknown variable" message is not logged. *) Bugfix: the active connection counter increased on the exceeding of the connection limit specified by the "worker_connections" directive; the bug had appeared in 0.2.0. *) Bugfix: the limit rate might not work on some condition; the bug had appeared in 0.3.38.
author Igor Sysoev <igor@sysoev.ru>
date Mon, 17 Apr 2006 19:55:41 +0000
parents 51b27717f140
children 5e8fb59c18c1
line wrap: on
line diff
--- a/src/event/ngx_event_accept.c
+++ b/src/event/ngx_event_accept.c
@@ -78,7 +78,6 @@ ngx_event_accept(ngx_event_t *ev)
 
 #if (NGX_STAT_STUB)
         ngx_atomic_fetch_add(ngx_stat_accepted, 1);
-        ngx_atomic_fetch_add(ngx_stat_active, 1);
 #endif
 
         ngx_accept_disabled = NGX_ACCEPT_THRESHOLD
@@ -95,6 +94,10 @@ ngx_event_accept(ngx_event_t *ev)
             return;
         }
 
+#if (NGX_STAT_STUB)
+        ngx_atomic_fetch_add(ngx_stat_active, 1);
+#endif
+
         c->pool = ngx_create_pool(ls->pool_size, ev->log);
         if (c->pool == NULL) {
             ngx_close_accepted_connection(c);