# HG changeset patch # User Roman Arutyunyan # Date 1458744315 -10800 # Node ID 78fc2dce69e7b3eacf4811094c675443af584b8c # Parent 384154fc634f76f07ad67e7642733096bc500fb0 Stream: detect port absence in proxy_pass with IP literal. This is a clone of http commit 26c127bab5ef. diff --git a/src/stream/ngx_stream_upstream.c b/src/stream/ngx_stream_upstream.c --- a/src/stream/ngx_stream_upstream.c +++ b/src/stream/ngx_stream_upstream.c @@ -388,7 +388,7 @@ ngx_stream_upstream_add(ngx_conf_t *cf, uscf->port = u->port; uscf->no_port = u->no_port; - if (u->naddrs == 1) { + if (u->naddrs == 1 && (u->port || u->family == AF_UNIX)) { uscf->servers = ngx_array_create(cf->pool, 1, sizeof(ngx_stream_upstream_server_t)); if (uscf->servers == NULL) {