]> git.kaiwu.me - nginx.git/commitdiff
Upstream: introduced a new macro for down value.
authorAleksei Bavshin <a.bavshin@nginx.com>
Wed, 4 Mar 2026 19:35:41 +0000 (11:35 -0800)
committerAleksei Bavshin <a.bavshin@f5.com>
Mon, 9 Mar 2026 17:08:30 +0000 (11:08 -0600)
src/http/ngx_http_upstream.c
src/http/ngx_http_upstream_round_robin.h
src/stream/ngx_stream_upstream.c
src/stream/ngx_stream_upstream_round_robin.h

index 3ee3120c8dfb6c795c2b28fd8fae8d3878b20fa0..270e5dac6072608f2eecd22fbc35a5dce6c5447c 100644 (file)
@@ -6530,7 +6530,7 @@ ngx_http_upstream_server(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
                 goto not_supported;
             }
 
-            us->down = 1;
+            us->down = NGX_HTTP_UPSTREAM_FAILED;
 
             continue;
         }
index b5678ada144fad8e982861ea74aad9ae3c788ed9..544d0fa20a95139c2d6228739da2118102d1162d 100644 (file)
@@ -18,6 +18,8 @@
 #define NGX_HTTP_UPSTREAM_SID_LEN    32  /* md5 in hex */
 #endif
 
+#define NGX_HTTP_UPSTREAM_FAILED     1
+
 
 typedef struct ngx_http_upstream_rr_peers_s  ngx_http_upstream_rr_peers_t;
 typedef struct ngx_http_upstream_rr_peer_s   ngx_http_upstream_rr_peer_t;
index 6526d3c2279da226172150b0ce162f1a6d786303..006672cdf8ab2385b17a91d0d7b34c5ec8c1937d 100644 (file)
@@ -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;
         }
index c168bfe80146fcc01b8a72752598be1481afc182..d36c2ad069717f40a6b69c6cef44c847855a0b44 100644 (file)
@@ -14,6 +14,9 @@
 #include <ngx_stream.h>
 
 
+#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;