aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_proxy_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream/ngx_stream_proxy_module.c')
-rw-r--r--src/stream/ngx_stream_proxy_module.c4
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);
}