Skip to content

Commit

Permalink
Stream: style.
Browse files Browse the repository at this point in the history
Explicitly initialized peer's max_conns for upstreams created with
variables similar to how it's done in http.
  • Loading branch information
mdocguard committed Sep 29, 2016
1 parent f674f32 commit 10f4195
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/stream/ngx_stream_upstream_round_robin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 10f4195

Please sign in to comment.