Welcome! Log In Create A New Profile

Advanced

[nginx] Fixed checking ngx_tcp_push() and ngx_tcp_nopush() return values.

March 19, 2018 09:30AM
details: http://hg.nginx.org/nginx/rev/400a3412b1e3
branches:
changeset: 7239:400a3412b1e3
user: Ruslan Ermilov <ru@nginx.com>
date: Mon Mar 19 16:28:23 2018 +0300
description:
Fixed checking ngx_tcp_push() and ngx_tcp_nopush() return values.

No functional changes.

diffstat:

src/http/ngx_http_upstream.c | 2 +-
src/os/unix/ngx_freebsd_sendfile_chain.c | 2 +-
src/os/unix/ngx_linux_sendfile_chain.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 06cf0c4b8618 -r 400a3412b1e3 src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Mon Mar 19 16:22:09 2018 +0300
+++ b/src/http/ngx_http_upstream.c Mon Mar 19 16:28:23 2018 +0300
@@ -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,
diff -r 06cf0c4b8618 -r 400a3412b1e3 src/os/unix/ngx_freebsd_sendfile_chain.c
--- a/src/os/unix/ngx_freebsd_sendfile_chain.c Mon Mar 19 16:22:09 2018 +0300
+++ b/src/os/unix/ngx_freebsd_sendfile_chain.c Mon Mar 19 16:28:23 2018 +0300
@@ -135,7 +135,7 @@ ngx_freebsd_sendfile_chain(ngx_connectio
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;

/*
diff -r 06cf0c4b8618 -r 400a3412b1e3 src/os/unix/ngx_linux_sendfile_chain.c
--- a/src/os/unix/ngx_linux_sendfile_chain.c Mon Mar 19 16:22:09 2018 +0300
+++ b/src/os/unix/ngx_linux_sendfile_chain.c Mon Mar 19 16:28:23 2018 +0300
@@ -130,7 +130,7 @@ ngx_linux_sendfile_chain(ngx_connection_

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;

/*
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Fixed checking ngx_tcp_push() and ngx_tcp_nopush() return values.

ru@nginx.com 657 March 19, 2018 09:30AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 316
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready