# HG changeset patch # User Igor Sysoev # Date 1179755294 0 # Node ID 451e34738078de0e256b0017ea2776a087ca5634 # Parent 8b3e59a6bfdb178589eb7094f2729f8b045a5c2c fix worker endless loop on 64-bit platform if 33+ backend has fall diff -r 8b3e59a6bfdb -r 451e34738078 src/http/ngx_http_upstream_round_robin.c --- a/src/http/ngx_http_upstream_round_robin.c Sat May 19 17:39:44 2007 +0000 +++ b/src/http/ngx_http_upstream_round_robin.c Mon May 21 13:48:14 2007 +0000 @@ -215,7 +215,7 @@ 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 @@ } 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)) {