mirror of
https://github.com/nginx/nginx.git
synced 2024-11-24 04:49:01 +08:00
quick resolving handles u->resolved->ctx by itself
This commit is contained in:
parent
a4ec6869fc
commit
f576f0d2bc
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user