# HG changeset patch # User Igor Sysoev # Date 1165825503 0 # Node ID f029e69eb010b5d37efdb490e4237a3c0302575d # Parent b579676ec6b29567dcb364a3a73c155b6600765e TCP upstreams always used the first TCP upstream with the same name diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2843,7 +2843,8 @@ ngx_http_upstream_add(ngx_conf_t *cf, ng uscfp = umcf->upstreams.elts; for (i = 0; i < umcf->upstreams.nelts; i++) { - if (uscfp[i]->host.len != u->host.len + if (uscfp[i]->port != u->portn + || uscfp[i]->host.len != u->host.len || ngx_strncasecmp(uscfp[i]->host.data, u->host.data, u->host.len) != 0) {