From cfa669151e605410cfb57cc70b0e4023f4777602 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Fri, 27 Nov 2020 00:01:20 +0300 Subject: 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). --- src/stream/ngx_stream_upstream_round_robin.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/stream/ngx_stream_upstream_round_robin.h') diff --git a/src/stream/ngx_stream_upstream_round_robin.h b/src/stream/ngx_stream_upstream_round_robin.h index 35d9fce6c..bd96667ba 100644 --- 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; -- cgit