aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_upstream.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-04-09 14:20:17 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-04-09 14:20:17 +0000
commitf576f0d2bcac29d21a16b440b83c0b32aa121257 (patch)
treec8466407ef706737458b042f9b42ad0943caa7c7 /src/http/ngx_http_upstream.c
parenta4ec6869fc47d753d281858f2a9ad5ae07c66509 (diff)
downloadnginx-f576f0d2bcac29d21a16b440b83c0b32aa121257.tar.gz
nginx-f576f0d2bcac29d21a16b440b83c0b32aa121257.zip
quick resolving handles u->resolved->ctx by itself
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r--src/http/ngx_http_upstream.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 987742e01..ed280a8c9 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -421,13 +421,14 @@ ngx_http_upstream_init(ngx_http_request_t *r)
ctx->data = r;
ctx->timeout = clcf->resolver_timeout;
+ u->resolved->ctx = ctx;
+
if (ngx_resolve_name(ctx) != NGX_OK) {
+ u->resolved->ctx = NULL;
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
return;
}
- u->resolved->ctx = ctx;
-
return;
}