You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by el...@apache.org on 2018/02/11 19:30:40 UTC

svn commit: r1823886 - /httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c

Author: elukey
Date: Sun Feb 11 19:30:40 2018
New Revision: 1823886

URL: http://svn.apache.org/viewvc?rev=1823886&view=rev
Log:
mod_proxy_fcgi: prioritize the check for mayflush when using flushpackets

The mayflush variable should be checked before the rest
to avoid polling when not needed.

Suggested by Yann Ylavic on the dev@ mailing list.


Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c?rev=1823886&r1=1823885&r2=1823886&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c Sun Feb 11 19:30:40 2018
@@ -889,10 +889,10 @@ recv_again:
                 }
             }
 
-            if (((conn->worker->s->flush_packets == flush_on) ||
-                 ((conn->worker->s->flush_packets == flush_auto) && 
-                  (apr_poll(flushpoll, 1, &flushpoll_fd,
-                            conn->worker->s->flush_wait) == APR_TIMEUP))) && mayflush) {
+            if (mayflush && ((conn->worker->s->flush_packets == flush_on) ||
+                             ((conn->worker->s->flush_packets == flush_auto) && 
+                              (apr_poll(flushpoll, 1, &flushpoll_fd,
+                               conn->worker->s->flush_wait) == APR_TIMEUP)))) {
                 apr_bucket* flush_b = apr_bucket_flush_create(r->connection->bucket_alloc);
                 APR_BRIGADE_INSERT_TAIL(ob, flush_b);
                 rv = ap_pass_brigade(r->output_filters, ob);