diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2006-12-11 08:59:30 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2006-12-11 08:59:30 +0000 |
| commit | 5d118d3f779569340613a77750bc106333db8a8f (patch) | |
| tree | 745e0619332fc9d3b6d242001eb8ce9fc7a57125 /src/http/ngx_http_upstream_round_robin.c | |
| parent | cf100a7827217dc4211e2a487d36e137bc46e653 (diff) | |
| download | nginx-5d118d3f779569340613a77750bc106333db8a8f.tar.gz nginx-5d118d3f779569340613a77750bc106333db8a8f.tar.bz2 | |
fix fastcgi and memcached upstreams
Diffstat (limited to 'src/http/ngx_http_upstream_round_robin.c')
| -rw-r--r-- | src/http/ngx_http_upstream_round_robin.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c index c7ec7ab56..82173e4b0 100644 --- a/src/http/ngx_http_upstream_round_robin.c +++ b/src/http/ngx_http_upstream_round_robin.c @@ -69,13 +69,20 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf, if (ngx_inet_resolve_host(cf, &u) != NGX_OK) { if (u.err) { ngx_log_error(NGX_LOG_EMERG, cf->log, 0, - "%s in upstream host \"%V\" is not found in %s:%ui", + "%s in upstream \"%V\" in %s:%ui", u.err, &us->host, us->file_name.data, us->line); } return NGX_ERROR; } + if (us->port == 0) { + ngx_log_error(NGX_LOG_EMERG, cf->log, 0, + "no port in upstream \"%V\" in %s:%ui", + &us->host, us->file_name.data, us->line); + return NGX_ERROR; + } + n = u.naddrs; peers = ngx_pcalloc(cf->pool, sizeof(ngx_http_upstream_rr_peers_t) |
