Mercurial > hg > nginx-quic
comparison src/http/ngx_http_upstream.c @ 5885:5a042519bfe7
Upstream: limited next_upstream time and tries when resolving DNS.
When got multiple upstream IP addresses using DNS resolving, the number of
upstreams tries and the maxinum time spent for these tries were not affected.
This patch fixed it.
author | Gu Feng <flygoast@126.com> |
---|---|
date | Mon, 27 Oct 2014 19:52:03 +0800 |
parents | 973ee2276300 |
children | 7d7eac6e31df |
comparison
equal
deleted
inserted
replaced
5884:8486205d10db | 5885:5a042519bfe7 |
---|---|
979 } | 979 } |
980 | 980 |
981 ngx_resolve_name_done(ctx); | 981 ngx_resolve_name_done(ctx); |
982 ur->ctx = NULL; | 982 ur->ctx = NULL; |
983 | 983 |
984 u->peer.start_time = ngx_current_msec; | |
985 | |
986 if (u->conf->next_upstream_tries | |
987 && u->peer.tries > u->conf->next_upstream_tries) | |
988 { | |
989 u->peer.tries = u->conf->next_upstream_tries; | |
990 } | |
991 | |
984 ngx_http_upstream_connect(r, u); | 992 ngx_http_upstream_connect(r, u); |
985 | 993 |
986 failed: | 994 failed: |
987 | 995 |
988 ngx_http_run_posted_requests(c); | 996 ngx_http_run_posted_requests(c); |