From ff979a48a0ccb9217437021b5eb9378448c2bd9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Wojta=C5=9B?= Date: Thu, 19 Apr 2018 13:42:13 +0200 Subject: [PATCH] Fix for nginx 1.14.0 --- ngx_http_upstream_fair_module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ngx_http_upstream_fair_module.c b/ngx_http_upstream_fair_module.c index a4419ca..2143972 100644 --- a/ngx_http_upstream_fair_module.c +++ b/ngx_http_upstream_fair_module.c @@ -540,7 +540,7 @@ ngx_http_upstream_init_fair_rr(ngx_conf_t *cf, ngx_http_upstream_srv_conf_t *us) /* an upstream implicitly defined by proxy_pass, etc. */ - if (us->port == 0 && us->default_port == 0) { + 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, us->line); @@ -550,7 +550,7 @@ ngx_http_upstream_init_fair_rr(ngx_conf_t *cf, ngx_http_upstream_srv_conf_t *us) ngx_memzero(&u, sizeof(ngx_url_t)); u.host = us->host; - u.port = (in_port_t) (us->port ? us->port : us->default_port); + u.port = us->port; if (ngx_inet_resolve_host(cf->pool, &u) != NGX_OK) { if (u.err) {