aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-12-11 16:26:56 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-12-11 16:26:56 +0000
commit6d4b5a1f86f847dac12dca290e76aadd1b8343bc (patch)
tree12215f7a2f2ab3ff06131405ba04526c502ab167 /src
parent3fc85af2fc60736b061acd823980031eb9a6f7cf (diff)
downloadnginx-6d4b5a1f86f847dac12dca290e76aadd1b8343bc.tar.gz
nginx-6d4b5a1f86f847dac12dca290e76aadd1b8343bc.zip
$upstream_addr did not contain last address, the bug was introduced in r1659
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_upstream.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 63f1cf6e4..2a01a4477 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -665,7 +665,6 @@ ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u)
tp = ngx_timeofday();
u->state->response_sec = tp->sec;
u->state->response_msec = tp->msec;
- u->state->peer = u->peer.name;
rc = ngx_event_connect_peer(&u->peer);
@@ -678,6 +677,8 @@ ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u)
return;
}
+ u->state->peer = u->peer.name;
+
if (rc == NGX_BUSY) {
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "no live upstreams");
ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_NOLIVE);