mirror of
https://github.com/nginx/nginx.git
synced 2026-06-26 20:01:45 +00:00
fix worker endless loop on 64-bit platform if 33+ backend has fall
This commit is contained in:
parent
3378750e2d
commit
0687cb9d99
1 changed files with 2 additions and 2 deletions
|
|
@ -215,7 +215,7 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
|
|||
rrp->current = rrp->peers->current;
|
||||
|
||||
n = rrp->current / (8 * sizeof(uintptr_t));
|
||||
m = 1 << rrp->current % (8 * sizeof(uintptr_t));
|
||||
m = (uintptr_t) 1 << rrp->current % (8 * sizeof(uintptr_t));
|
||||
|
||||
if (!(rrp->tried[n] & m)) {
|
||||
peer = &rrp->peers->peer[rrp->current];
|
||||
|
|
@ -268,7 +268,7 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
|
|||
} else {
|
||||
for ( ;; ) {
|
||||
n = rrp->current / (8 * sizeof(uintptr_t));
|
||||
m = 1 << rrp->current % (8 * sizeof(uintptr_t));
|
||||
m = (uintptr_t) 1 << rrp->current % (8 * sizeof(uintptr_t));
|
||||
|
||||
if (!(rrp->tried[n] & m)) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue