From: Yann Ylavic Date: Thu, 26 Mar 2015 08:15:32 +0000 (+0000) Subject: core_filters: restore/disable TCP_NOPUSH option after non-blocking sendfile. X-Git-Tag: 2.5.0-alpha~3354 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=621813b6c2141b6cb3b4b260ea06dd1ac83d8c62;p=apache 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 --- 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;