aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream/ngx_stream.c')
-rw-r--r--src/stream/ngx_stream.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/stream/ngx_stream.c b/src/stream/ngx_stream.c
index e5ffcf9bc..18aea28af 100644
--- a/src/stream/ngx_stream.c
+++ b/src/stream/ngx_stream.c
@@ -393,13 +393,7 @@ ngx_stream_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports)
ls->servers = stport;
- if (i == last - 1) {
- stport->naddrs = last;
-
- } else {
- stport->naddrs = 1;
- i = 0;
- }
+ stport->naddrs = i + 1;
switch (ls->sockaddr->sa_family) {
#if (NGX_HAVE_INET6)