From 621813b6c2141b6cb3b4b260ea06dd1ac83d8c62 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Thu, 26 Mar 2015 08:15:32 +0000 Subject: [PATCH] core_filters: restore/disable TCP_NOPUSH option after non-blocking sendfile. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1669289 13f79535-47bb-0310-9956-ffa450edef68 --- server/core_filters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/core_filters.c b/server/core_filters.c index 1d7470b27f..a6c2bd666b 100644 --- a/server/core_filters.c +++ b/server/core_filters.c @@ -677,7 +677,6 @@ static apr_status_t send_brigade_nonblocking(apr_socket_t *s, if (nvec > 0) { (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 1); rv = writev_nonblocking(s, vec, nvec, bb, bytes_written, c); - nvec = 0; if (rv != APR_SUCCESS) { (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 0); return rv; @@ -686,6 +685,7 @@ static apr_status_t send_brigade_nonblocking(apr_socket_t *s, rv = sendfile_nonblocking(s, bucket, bytes_written, c); if (nvec > 0) { (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 0); + nvec = 0; } if (rv != APR_SUCCESS) { return rv; -- 2.40.0