]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Follow-up to r1538490:
authorJeff Trawick <trawick@apache.org>
Tue, 26 Nov 2013 17:11:51 +0000 (17:11 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 26 Nov 2013 17:11:51 +0000 (17:11 +0000)
Ensure that conn_rec->sbh is always cleared when returning from process_socket().

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

server/mpm/event/event.c
server/mpm/eventopt/eventopt.c

index 7aceeeca5405751d3a97a371f443d87574c64753..d36abbc64b702b61d9095ef8f420e6e8dfc30061 100644 (file)
@@ -1028,6 +1028,7 @@ read_request:
              * event thread poll for writeability.
              */
             cs->expiration_time = ap_server_conf->timeout + apr_time_now();
+            c->sbh = NULL;
             apr_thread_mutex_lock(timeout_mutex);
             TO_QUEUE_APPEND(write_completion_q, cs);
             cs->pfd.reqevents = (
@@ -1052,8 +1053,10 @@ read_request:
     }
 
     if (cs->pub.state == CONN_STATE_LINGER) {
-        if (!start_lingering_close_blocking(cs))
+        if (!start_lingering_close_blocking(cs)) {
+            c->sbh = NULL;
             return;
+        }
     }
     else if (cs->pub.state == CONN_STATE_CHECK_REQUEST_LINE_READABLE) {
         /* It greatly simplifies the logic to use a single timeout value here
index 000f265de31be229af0b95ff34e0604fb5c0424a..0cdbc34c05c6160e1c2c35caad7f95b8d4d09ec7 100644 (file)
@@ -1080,6 +1080,7 @@ read_request:
             pollset_op_t *v = ap_equeue_writer_value(eq);
 
             cs->expiration_time = ap_server_conf->timeout + apr_time_now();
+            c->sbh = NULL;
             cs->pfd.reqevents = (
                     cs->pub.sense == CONN_SENSE_WANT_READ ? APR_POLLIN :
                             APR_POLLOUT) | APR_POLLHUP | APR_POLLERR;
@@ -1108,6 +1109,7 @@ read_request:
 
     if (cs->pub.state == CONN_STATE_LINGER) {
         if (!start_lingering_close_blocking(cs, eq)) {
+            c->sbh = NULL;
             return;
         }
     }