]> git.kaiwu.me - nginx.git/commitdiff
test duplicate limit_conn
authorIgor Sysoev <igor@sysoev.ru>
Mon, 8 Dec 2008 14:08:44 +0000 (14:08 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 8 Dec 2008 14:08:44 +0000 (14:08 +0000)
src/http/modules/ngx_http_limit_zone_module.c

index c7a3753d9f35665973594810a922a4241c83a835..824803d34f333abcb9b50626d210d81181c3a233 100644 (file)
@@ -462,6 +462,10 @@ ngx_http_limit_conn(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     ngx_int_t   n;
     ngx_str_t  *value;
 
+    if (lzcf->shm_zone) {
+        return "is duplicate";
+    }
+
     value = cf->args->elts;
 
     lzcf->shm_zone = ngx_shared_memory_add(cf, &value[1], 0,