diff src/stream/ngx_stream_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 f41c2530dd17
children
line wrap: on
line diff
--- a/src/stream/ngx_stream_upstream_round_robin.h
+++ b/src/stream/ngx_stream_upstream_round_robin.h
@@ -66,6 +66,7 @@ struct ngx_stream_upstream_rr_peers_s {
 #endif
 
     ngx_uint_t                       total_weight;
+    ngx_uint_t                       tries;
 
     unsigned                         single:1;
     unsigned                         weighted:1;