From e72025e6060cdc4dc92ad302c412bbaa10a0e43f Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Thu, 21 Dec 2017 17:45:08 +0000 Subject: [PATCH] mpm_event: follow up to r1818804. 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index d551fb81f2..461d0c0e6d 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -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", -- 2.40.0