Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: def7fbf4a3
Fetching contributors…

Cannot retrieve contributors at this time

file 24 lines (22 sloc) 0.815 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Index: nginx-catap/nginx/src/http/ngx_http_upstream_round_robin.c
===================================================================
--- nginx-catap.orig/nginx/src/http/ngx_http_upstream_round_robin.c
+++ nginx-catap/nginx/src/http/ngx_http_upstream_round_robin.c
@@ -674,7 +674,7 @@ failed:
 static ngx_uint_t
 ngx_http_upstream_get_peer(ngx_http_upstream_rr_peers_t *peers)
 {
- ngx_uint_t i, n;
+ ngx_uint_t i, n, reset = 0;
     ngx_http_upstream_rr_peer_t *peer;
 
     peer = &peers->peer[0];
@@ -713,6 +713,10 @@ ngx_http_upstream_get_peer(ngx_http_upst
             return n;
         }
 
+ if (reset++) {
+ return 0;
+ }
+
         for (i = 0; i < peers->number; i++) {
             peer[i].current_weight = peer[i].weight;
         }
Something went wrong with that request. Please try again.