mirror of
https://github.com/nginx/nginx.git
synced 2025-06-08 02:02:38 +08:00
Upstream keepalive: slightly simplified code.
This commit is contained in:
parent
1f415d6fb9
commit
c9c4e39be6
@ -81,7 +81,7 @@ static ngx_command_t ngx_http_upstream_keepalive_commands[] = {
|
||||
{ ngx_string("keepalive"),
|
||||
NGX_HTTP_UPS_CONF|NGX_CONF_TAKE12,
|
||||
ngx_http_upstream_keepalive,
|
||||
0,
|
||||
NGX_HTTP_SRV_CONF_OFFSET,
|
||||
0,
|
||||
NULL },
|
||||
|
||||
@ -481,7 +481,7 @@ static char *
|
||||
ngx_http_upstream_keepalive(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
{
|
||||
ngx_http_upstream_srv_conf_t *uscf;
|
||||
ngx_http_upstream_keepalive_srv_conf_t *kcf;
|
||||
ngx_http_upstream_keepalive_srv_conf_t *kcf = conf;
|
||||
|
||||
ngx_int_t n;
|
||||
ngx_str_t *value;
|
||||
@ -489,9 +489,6 @@ ngx_http_upstream_keepalive(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
|
||||
uscf = ngx_http_conf_get_module_srv_conf(cf, ngx_http_upstream_module);
|
||||
|
||||
kcf = ngx_http_conf_upstream_srv_conf(uscf,
|
||||
ngx_http_upstream_keepalive_module);
|
||||
|
||||
if (kcf->original_init_upstream) {
|
||||
return "is duplicate";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user