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-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a28ad72c4ccbaad80d28fa5ad3f38e4cb8a7a879;p=thirdparty%2Fapache%2Fhttpd.git 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 1d7470b27f2..a6c2bd666b2 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;