Fixed checking ngx_tcp_push() and ngx_tcp_nopush() return values.

No functional changes.
This commit is contained in:
Ruslan Ermilov 2018-03-19 16:28:23 +03:00
parent 510986b806
commit c09aa142d6
3 changed files with 3 additions and 3 deletions

View File

@ -2020,7 +2020,7 @@ ngx_http_upstream_send_request(ngx_http_request_t *r, ngx_http_upstream_t *u,
}
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,

View File

@ -135,7 +135,7 @@ ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
if (ngx_freebsd_use_tcp_nopush
&& c->tcp_nopush == NGX_TCP_NOPUSH_UNSET)
{
if (ngx_tcp_nopush(c->fd) == NGX_ERROR) {
if (ngx_tcp_nopush(c->fd) == -1) {
err = ngx_socket_errno;
/*

View File

@ -130,7 +130,7 @@ ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
if (c->tcp_nodelay == NGX_TCP_NODELAY_UNSET) {
if (ngx_tcp_nopush(c->fd) == NGX_ERROR) {
if (ngx_tcp_nopush(c->fd) == -1) {
err = ngx_socket_errno;
/*