Mercurial > hg > nginx-quic
changeset 6393:70e6e1f12dee
Stream: initialize variable right before using it.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Thu, 11 Feb 2016 14:20:26 +0300 |
parents | 4eb1b5c6d9c6 |
children | 5fe617f38222 |
files | src/stream/ngx_stream_proxy_module.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/stream/ngx_stream_proxy_module.c +++ b/src/stream/ngx_stream_proxy_module.c @@ -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); }