]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mpm_event: clear APR_INCOMPLETE_READ on lingering close.
authorYann Ylavic <ylavic@apache.org>
Thu, 22 Jul 2021 16:01:43 +0000 (16:01 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 22 Jul 2021 16:01:43 +0000 (16:01 +0000)
* server/mpm/event/event.c (process_lingering_close): APR_INCOMPLETE_READ may
  have been set anytime while processing the connection, clear it before
  nonblocking apr_socket_recv() to prevent internal apr_poll().

Follow up to r1891716.

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

server/mpm/event/event.c

index 79c5f8cfa15ea253f770b9855dad0ffd8bfffcdc..e77da8b2b98335f0f584cd521942cf52ae12776c 100644 (file)
@@ -1693,6 +1693,10 @@ static void process_lingering_close(event_conn_state_t *cs)
         }
 
         cs->queue_timestamp = apr_time_now();
+        /* Clear APR_INCOMPLETE_READ if it was ever set, we'll do the poll()
+         * at the listener only from now, if needed.
+         */
+        apr_socket_opt_set(csd, APR_INCOMPLETE_READ, 0);
         /*
          * If some module requested a shortened waiting period, only wait for
          * 2s (SECONDS_TO_LINGER). This is useful for mitigating certain