aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2016-09-29 12:59:13 +0300
committerRuslan Ermilov <ru@nginx.com>2016-09-29 12:59:13 +0300
commit10f419575a02ae461fa32646fae9f8b30c433a53 (patch)
treed3925a26cdf59beaf1ed63de03d68b8afd07980b /src
parentf674f32c09c9938d5f2b19509166e5c5e28a9e3c (diff)
downloadnginx-10f419575a02ae461fa32646fae9f8b30c433a53.tar.gz
nginx-10f419575a02ae461fa32646fae9f8b30c433a53.zip
Stream: style.
Explicitly initialized peer's max_conns for upstreams created with variables similar to how it's done in http.
Diffstat (limited to 'src')
-rw-r--r--src/stream/ngx_stream_upstream_round_robin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stream/ngx_stream_upstream_round_robin.c b/src/stream/ngx_stream_upstream_round_robin.c
index 3f4bfcfa5..87ca301ce 100644
--- a/src/stream/ngx_stream_upstream_round_robin.c
+++ b/src/stream/ngx_stream_upstream_round_robin.c
@@ -347,6 +347,7 @@ ngx_stream_upstream_create_round_robin_peer(ngx_stream_session_t *s,
peer[0].weight = 1;
peer[0].effective_weight = 1;
peer[0].current_weight = 0;
+ peer[0].max_conns = 0;
peer[0].max_fails = 1;
peer[0].fail_timeout = 10;
peers->peer = peer;
@@ -380,6 +381,7 @@ ngx_stream_upstream_create_round_robin_peer(ngx_stream_session_t *s,
peer[i].weight = 1;
peer[i].effective_weight = 1;
peer[i].current_weight = 0;
+ peer[i].max_conns = 0;
peer[i].max_fails = 1;
peer[i].fail_timeout = 10;
*peerp = &peer[i];