aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-05-21 13:48:14 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-05-21 13:48:14 +0000
commit0687cb9d9932e3ff3e04082a024a7ae5859ea0a7 (patch)
treec1d35d2df1b7af3a1125845a86ef5c50b7403115 /src
parent3378750e2d256ef2a6d3512d8da8535b1d2fda73 (diff)
downloadnginx-0687cb9d9932e3ff3e04082a024a7ae5859ea0a7.tar.gz
nginx-0687cb9d9932e3ff3e04082a024a7ae5859ea0a7.zip
fix worker endless loop on 64-bit platform if 33+ backend has fall
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_upstream_round_robin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c
index 359a73624..b54e7a72d 100644
--- a/src/http/ngx_http_upstream_round_robin.c
+++ b/src/http/ngx_http_upstream_round_robin.c
@@ -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)) {