diff options
author | Ruslan Ermilov <ru@nginx.com> | 2013-05-15 15:04:49 +0400 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2013-05-15 15:04:49 +0400 |
commit | c9c4e39be6f248f1b20044dde35b1e593352961c (patch) | |
tree | f6471055d771c2d249da89250ae585f4fe777f06 /src/http/modules/ngx_http_upstream_keepalive_module.c | |
parent | 1f415d6fb9e77f058eacb56f2838d578e5f37faa (diff) | |
download | nginx-c9c4e39be6f248f1b20044dde35b1e593352961c.tar.gz nginx-c9c4e39be6f248f1b20044dde35b1e593352961c.zip |
Upstream keepalive: slightly simplified code.
Diffstat (limited to 'src/http/modules/ngx_http_upstream_keepalive_module.c')
-rw-r--r-- | src/http/modules/ngx_http_upstream_keepalive_module.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/http/modules/ngx_http_upstream_keepalive_module.c b/src/http/modules/ngx_http_upstream_keepalive_module.c index eed117404..d07ed9eda 100644 --- a/src/http/modules/ngx_http_upstream_keepalive_module.c +++ b/src/http/modules/ngx_http_upstream_keepalive_module.c @@ -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"; } |