Skip to content

Commit

Permalink
Stream: detect port absence in proxy_pass with IP literal.
Browse files Browse the repository at this point in the history
This is a clone of http commit 26c127bab5ef.
  • Loading branch information
arut committed Mar 23, 2016
1 parent f625ad7 commit 3c48fd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stream/ngx_stream_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ ngx_stream_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags)
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) {
Expand Down

0 comments on commit 3c48fd7

Please sign in to comment.