Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
7238:06cf0c4b8618 | 7239:400a3412b1e3 |
---|---|
2018 if (c->write->timer_set) { | 2018 if (c->write->timer_set) { |
2019 ngx_del_timer(c->write); | 2019 ngx_del_timer(c->write); |
2020 } | 2020 } |
2021 | 2021 |
2022 if (c->tcp_nopush == NGX_TCP_NOPUSH_SET) { | 2022 if (c->tcp_nopush == NGX_TCP_NOPUSH_SET) { |
2023 if (ngx_tcp_push(c->fd) == NGX_ERROR) { | 2023 if (ngx_tcp_push(c->fd) == -1) { |
2024 ngx_log_error(NGX_LOG_CRIT, c->log, ngx_socket_errno, | 2024 ngx_log_error(NGX_LOG_CRIT, c->log, ngx_socket_errno, |
2025 ngx_tcp_push_n " failed"); | 2025 ngx_tcp_push_n " failed"); |
2026 ngx_http_upstream_finalize_request(r, u, | 2026 ngx_http_upstream_finalize_request(r, u, |
2027 NGX_HTTP_INTERNAL_SERVER_ERROR); | 2027 NGX_HTTP_INTERNAL_SERVER_ERROR); |
2028 return; | 2028 return; |