]> git.kaiwu.me - nginx.git/commitdiff
TCP upstreams always used the first TCP upstream with the same name
authorIgor Sysoev <igor@sysoev.ru>
Mon, 11 Dec 2006 08:25:03 +0000 (08:25 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 11 Dec 2006 08:25:03 +0000 (08:25 +0000)
src/http/ngx_http_upstream.c

index a268f193fd0845054fe5546d76c421f0ad5b81fe..a358ce248c91f844e37b56cbdca89945dbb71576 100644 (file)
@@ -2843,7 +2843,8 @@ ngx_http_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags)
     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)
         {