diff options
-rw-r--r-- | src/core/nginx.h | 2 | ||||
-rw-r--r-- | src/http/modules/perl/nginx.pm | 2 | ||||
-rw-r--r-- | src/http/ngx_http_upstream_round_robin.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/core/nginx.h b/src/core/nginx.h index 97c8dfb93..f82c86137 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VERSION "0.6.10" +#define NGINX_VERSION "0.6.11" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm index c18ac2ef5..26bdc17e7 100644 --- a/src/http/modules/perl/nginx.pm +++ b/src/http/modules/perl/nginx.pm @@ -47,7 +47,7 @@ our @EXPORT = qw( HTTP_INSUFFICIENT_STORAGE ); -our $VERSION = '0.6.10'; +our $VERSION = '0.6.11'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c index 441a1aaab..4f017f922 100644 --- a/src/http/ngx_http_upstream_round_robin.c +++ b/src/http/ngx_http_upstream_round_robin.c @@ -514,8 +514,8 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peers_t *peers) } for (i = 0; i < peers->number; i++) { - if (peer[i].fails == 0) { - peer[i].current_weight = peer[i].weight; + if (peer->max_fails == 0 || peer->fails < peer->max_fails) { + peer[i].current_weight += peer[i].weight; } else { /* 1 allows to go to quick recovery when all peers failed */ |