diff src/http/ngx_http_upstream.c @ 7239:400a3412b1e3

Fixed checking ngx_tcp_push() and ngx_tcp_nopush() return values. No functional changes.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 19 Mar 2018 16:28:23 +0300
parents a7ed15573ae9
children 4db4fe3bdeda
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2020,7 +2020,7 @@ ngx_http_upstream_send_request(ngx_http_
     }
 
     if (c->tcp_nopush == NGX_TCP_NOPUSH_SET) {
-        if (ngx_tcp_push(c->fd) == NGX_ERROR) {
+        if (ngx_tcp_push(c->fd) == -1) {
             ngx_log_error(NGX_LOG_CRIT, c->log, ngx_socket_errno,
                           ngx_tcp_push_n " failed");
             ngx_http_upstream_finalize_request(r, u,