]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mpm_event: follow up to r1823047: simplify "clogging" logic (reentrance).
authorYann Ylavic <ylavic@apache.org>
Fri, 16 Feb 2018 13:02:27 +0000 (13:02 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 16 Feb 2018 13:02:27 +0000 (13:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1824463 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/event/event.c

index 0855640b82f6a9cdfa23f7ed799fdff21c1aa62a..a58a552ce7d9ecf6991631ffa7f0cce48c2a08cd 100644 (file)
@@ -1070,22 +1070,22 @@ static void process_socket(apr_thread_t *thd, apr_pool_t * p, apr_socket_t * soc
         /* fall through */
     }
     else {
-        clogging = c->clogging_input_filters;
-        if (clogging || cs->pub.state == CONN_STATE_READ_REQUEST_LINE) {
+        if (cs->pub.state == CONN_STATE_READ_REQUEST_LINE
             /* If we have an input filter which 'clogs' the input stream,
              * like mod_ssl used to, lets just do the normal read from input
              * filters, like the Worker MPM does. Filters that need to write
              * where they would otherwise read, or read where they would
              * otherwise write, should set the sense appropriately.
              */
+             || c->clogging_input_filters) {
 read_request:
+            clogging = c->clogging_input_filters;
             if (clogging) {
                 apr_atomic_inc32(&clogged_count);
             }
             rc = ap_run_process_connection(c);
             if (clogging) {
                 apr_atomic_dec32(&clogged_count);
-                clogging = c->clogging_input_filters;
             }
             if (cs->pub.state > CONN_STATE_LINGER) {
                 cs->pub.state = CONN_STATE_LINGER;