diff src/http/ngx_http_upstream_round_robin.h @ 7750:90cc7194e993

Upstream: excluded down servers from the next_upstream tries. Previously, the number of next_upstream tries included servers marked as "down", resulting in "no live upstreams" with the code 502 instead of the code derived from an attempt to connect to the last tried "up" server (ticket #2096).
author Ruslan Ermilov <ru@nginx.com>
date Fri, 27 Nov 2020 00:01:20 +0300
parents e38e9c50a40e
children
line wrap: on
line diff
--- a/src/http/ngx_http_upstream_round_robin.h
+++ b/src/http/ngx_http_upstream_round_robin.h
@@ -68,6 +68,7 @@ struct ngx_http_upstream_rr_peers_s {
 #endif
 
     ngx_uint_t                      total_weight;
+    ngx_uint_t                      tries;
 
     unsigned                        single:1;
     unsigned                        weighted:1;