diff options
author | Roman Arutyunyan <arut@nginx.com> | 2016-02-11 14:20:26 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2016-02-11 14:20:26 +0300 |
commit | f1f419fd2c8b948b395694a152658f4d7c4b55b2 (patch) | |
tree | 596cc4055bba97adb56ac4852986414330b25f86 /src/stream/ngx_stream_proxy_module.c | |
parent | 1cdd0cc421f7b47db790369969059c179413d4f7 (diff) | |
download | nginx-f1f419fd2c8b948b395694a152658f4d7c4b55b2.tar.gz nginx-f1f419fd2c8b948b395694a152658f4d7c4b55b2.zip |
Stream: initialize variable right before using it.
Diffstat (limited to 'src/stream/ngx_stream_proxy_module.c')
-rw-r--r-- | src/stream/ngx_stream_proxy_module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stream/ngx_stream_proxy_module.c b/src/stream/ngx_stream_proxy_module.c index 42c3374a1..b969fea14 100644 --- 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_session_t *s) 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_session_t *s) 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); } |