]> git.kaiwu.me - nginx.git/commitdiff
Limit conn: returned to the old behavior of using the first actual limit on
authorValentin Bartenev <vbart@nginx.com>
Fri, 10 Feb 2012 10:48:58 +0000 (10:48 +0000)
committerValentin Bartenev <vbart@nginx.com>
Fri, 10 Feb 2012 10:48:58 +0000 (10:48 +0000)
the way.

It was unintentionally changed in r4272, so that it could only limit the first
location where the processing of the request has reached PREACCESS phase.

src/http/modules/ngx_http_limit_conn_module.c

index f98e7bc51148e2c446e17203b3d1fc6c084f3d70..6322fd6827afffe9ab2480276d5f96fe18ca6b81 100644 (file)
@@ -159,8 +159,6 @@ ngx_http_limit_conn_handler(ngx_http_request_t *r)
         return NGX_DECLINED;
     }
 
-    r->main->limit_conn_set = 1;
-
     lccf = ngx_http_get_module_loc_conf(r, ngx_http_limit_conn_module);
     limits = lccf->limits.elts;
 
@@ -187,6 +185,8 @@ ngx_http_limit_conn_handler(ngx_http_request_t *r)
             continue;
         }
 
+        r->main->limit_conn_set = 1;
+
         hash = ngx_crc32_short(vv->data, len);
 
         shpool = (ngx_slab_pool_t *) limits[i].shm_zone->shm.addr;