diff src/http/ngx_http.c @ 3224:8e76e636ae3b

allow to set listen options in any server
author Igor Sysoev <igor@sysoev.ru>
date Wed, 21 Oct 2009 19:16:38 +0000
parents bfcc1a6dd184
children 4872f86df719
line wrap: on
line diff
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1209,6 +1209,12 @@ ngx_http_add_addresses(ngx_conf_t *cf, n
             return NGX_ERROR;
         }
 
+        if (lsopt->set && addr[i].opt.set) {
+            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+                        "a duplicate listen options for %s", addr[i].opt.addr);
+            return NGX_ERROR;
+        }
+
         /* check the duplicate "default" server for this address:port */
 
         if (lsopt->default_server) {