]> granicus.if.org Git - apache/commitdiff
mpm_event: follow up to r1818804.
authorYann Ylavic <ylavic@apache.org>
Thu, 21 Dec 2017 17:45:08 +0000 (17:45 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 21 Dec 2017 17:45:08 +0000 (17:45 +0000)
Allow DONE as a successful ap_run_process_connection() return value, for
instance h2_conn_run() and h2_task_process_conn() uses it, third-party
modules may too...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1818960 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/event/event.c

index d551fb81f241a585d0ad9a7de44fe8cb3a369798..461d0c0e6df47200bf48d23c9c8e72a9a3846f41 100644 (file)
@@ -1049,10 +1049,16 @@ static void process_socket(apr_thread_t *thd, apr_pool_t * p, apr_socket_t * soc
         apr_atomic_inc32(&clogged_count);
         rc = ap_run_process_connection(c);
         apr_atomic_dec32(&clogged_count);
+        if (rc == DONE) {
+            rc = OK;
+        }
     }
     else if (cs->pub.state == CONN_STATE_READ_REQUEST_LINE) {
 read_request:
         rc = ap_run_process_connection(c);
+        if (rc == DONE) {
+            rc = OK;
+        }
     }
     /*
      * The process_connection hooks above should set the connection state
@@ -1077,8 +1083,8 @@ read_request:
      * worker or prefork MPMs for instance.
      */
     if (rc != OK || (cs->pub.state != CONN_STATE_LINGER
-                     && cs->pub.state != CONN_STATE_CHECK_REQUEST_LINE_READABLE
                      && cs->pub.state != CONN_STATE_WRITE_COMPLETION
+                     && cs->pub.state != CONN_STATE_CHECK_REQUEST_LINE_READABLE
                      && cs->pub.state != CONN_STATE_SUSPENDED)) {
         ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO()
                       "process_socket: connection processing %s: closing",