From c5036ad30cfafb233494fa81c0b328aac3eb0e9b Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Wed, 4 Mar 2026 11:35:41 -0800 Subject: Upstream: introduced a new macro for down value. --- src/stream/ngx_stream_upstream.c | 2 +- src/stream/ngx_stream_upstream_round_robin.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/stream') diff --git a/src/stream/ngx_stream_upstream.c b/src/stream/ngx_stream_upstream.c index 6526d3c22..006672cdf 100644 --- a/src/stream/ngx_stream_upstream.c +++ b/src/stream/ngx_stream_upstream.c @@ -536,7 +536,7 @@ ngx_stream_upstream_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) goto not_supported; } - us->down = 1; + us->down = NGX_STREAM_UPSTREAM_FAILED; continue; } diff --git a/src/stream/ngx_stream_upstream_round_robin.h b/src/stream/ngx_stream_upstream_round_robin.h index c168bfe80..d36c2ad06 100644 --- a/src/stream/ngx_stream_upstream_round_robin.h +++ b/src/stream/ngx_stream_upstream_round_robin.h @@ -14,6 +14,9 @@ #include +#define NGX_STREAM_UPSTREAM_FAILED 1 + + typedef struct ngx_stream_upstream_rr_peers_s ngx_stream_upstream_rr_peers_t; typedef struct ngx_stream_upstream_rr_peer_s ngx_stream_upstream_rr_peer_t; -- cgit