mirror of
https://github.com/nginx/nginx.git
synced 2024-12-19 05:33:52 -06:00
Upstream: fixed state resetting when switching to backup servers.
Based on patch by Thomas Chen (ticket #257).
This commit is contained in:
parent
cb90df084f
commit
dd46cc659a
@ -313,7 +313,9 @@ failed:
|
||||
lcp->rrp.peers = peers->next;
|
||||
pc->tries = lcp->rrp.peers->number;
|
||||
|
||||
n = lcp->rrp.peers->number / (8 * sizeof(uintptr_t)) + 1;
|
||||
n = (lcp->rrp.peers->number + (8 * sizeof(uintptr_t) - 1))
|
||||
/ (8 * sizeof(uintptr_t));
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
lcp->rrp.tried[i] = 0;
|
||||
}
|
||||
|
@ -474,7 +474,9 @@ failed:
|
||||
rrp->peers = peers->next;
|
||||
pc->tries = rrp->peers->number;
|
||||
|
||||
n = rrp->peers->number / (8 * sizeof(uintptr_t)) + 1;
|
||||
n = (rrp->peers->number + (8 * sizeof(uintptr_t) - 1))
|
||||
/ (8 * sizeof(uintptr_t));
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
rrp->tried[i] = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user