details: http://hg.nginx.org/nginx/rev/70e6e1f12dee branches: changeset: 6393:70e6e1f12dee user: Roman Arutyunyan <a...@nginx.com> date: Thu Feb 11 14:20:26 2016 +0300 description: Stream: initialize variable right before using it.
diffstat: src/stream/ngx_stream_proxy_module.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 4eb1b5c6d9c6 -r 70e6e1f12dee src/stream/ngx_stream_proxy_module.c --- a/src/stream/ngx_stream_proxy_module.c Thu Feb 11 14:20:22 2016 +0300 +++ b/src/stream/ngx_stream_proxy_module.c Thu Feb 11 14:20:26 2016 +0300 @@ -432,8 +432,6 @@ ngx_stream_proxy_connect(ngx_stream_sess ngx_log_debug1(NGX_LOG_DEBUG_STREAM, c->log, 0, "proxy connect: %i", rc); - pscf = ngx_stream_get_module_srv_conf(s, ngx_stream_proxy_module); - if (rc == NGX_ERROR) { ngx_stream_proxy_finalize(s, NGX_ERROR); return; @@ -468,6 +466,8 @@ ngx_stream_proxy_connect(ngx_stream_sess pc->read->handler = ngx_stream_proxy_connect_handler; pc->write->handler = ngx_stream_proxy_connect_handler; + pscf = ngx_stream_get_module_srv_conf(s, ngx_stream_proxy_module); + ngx_add_timer(pc->write, pscf->connect_timeout); } _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel