mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
fix r3225: it overrode the listen options by default server default options
This commit is contained in:
parent
9826961ed4
commit
acb43232f6
@ -1209,10 +1209,15 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf,
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (lsopt->set && addr[i].opt.set) {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||
if (lsopt->set) {
|
||||
|
||||
if (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;
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
addr[i].opt = *lsopt;
|
||||
}
|
||||
|
||||
/* check the duplicate "default" server for this address:port */
|
||||
@ -1225,7 +1230,6 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf,
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
addr[i].opt = *lsopt;
|
||||
addr[i].default_server = cscf;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user