You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2015/03/26 09:15:33 UTC

svn commit: r1669289 - /httpd/httpd/trunk/server/core_filters.c

Author: ylavic
Date: Thu Mar 26 08:15:32 2015
New Revision: 1669289

URL: http://svn.apache.org/r1669289
Log:
core_filters: restore/disable TCP_NOPUSH option after non-blocking sendfile.

Modified:
    httpd/httpd/trunk/server/core_filters.c

Modified: httpd/httpd/trunk/server/core_filters.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core_filters.c?rev=1669289&r1=1669288&r2=1669289&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core_filters.c (original)
+++ httpd/httpd/trunk/server/core_filters.c Thu Mar 26 08:15:32 2015
@@ -677,7 +677,6 @@ static apr_status_t send_brigade_nonbloc
                 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_nonbloc
                 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;