summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAleksei Bavshin <a.bavshin@nginx.com>2026-03-04 11:35:41 -0800
committerAleksei Bavshin <a.bavshin@f5.com>2026-03-09 11:08:30 -0600
commitc5036ad30cfafb233494fa81c0b328aac3eb0e9b (patch)
tree5aea0b096a36167b83745b444e5f725f9e999ccb /src
parentaf7137c88a87d4592d8d5879adf50b151d61e5b6 (diff)
downloadnginx-c5036ad30cfafb233494fa81c0b328aac3eb0e9b.tar.gz
nginx-c5036ad30cfafb233494fa81c0b328aac3eb0e9b.tar.bz2
Upstream: introduced a new macro for down value.
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_upstream.c2
-rw-r--r--src/http/ngx_http_upstream_round_robin.h2
-rw-r--r--src/stream/ngx_stream_upstream.c2
-rw-r--r--src/stream/ngx_stream_upstream_round_robin.h3
4 files changed, 7 insertions, 2 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 3ee3120c8..270e5dac6 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -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;
}
diff --git a/src/http/ngx_http_upstream_round_robin.h b/src/http/ngx_http_upstream_round_robin.h
index b5678ada1..544d0fa20 100644
--- a/src/http/ngx_http_upstream_round_robin.h
+++ b/src/http/ngx_http_upstream_round_robin.h
@@ -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;
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 <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;