diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/http/ngx_http_upstream.c | 2 | ||||
| -rw-r--r-- | src/http/ngx_http_upstream_round_robin.h | 2 | ||||
| -rw-r--r-- | src/stream/ngx_stream_upstream.c | 2 | ||||
| -rw-r--r-- | src/stream/ngx_stream_upstream_round_robin.h | 3 |
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; |
