]> granicus.if.org Git - apache/commitdiff
c->sbh can be unexpectedly NULL when the thread that pulls the ready keepalive
authorEric Covener <covener@apache.org>
Mon, 4 Nov 2013 01:37:31 +0000 (01:37 +0000)
committerEric Covener <covener@apache.org>
Mon, 4 Nov 2013 01:37:31 +0000 (01:37 +0000)
connection out of the queue laps the thread that put it on the queue.

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

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

index 2dad7feaabb45b3eacd43db059902efba5c5ce1c..9da5e6502233d2cffe4df463ee25b5596a9669a0 100644 (file)
@@ -1066,6 +1066,7 @@ read_request:
          */
         cs->expiration_time = ap_server_conf->keep_alive_timeout +
                               apr_time_now();
+        c->sbh = NULL;
         apr_thread_mutex_lock(timeout_mutex);
         TO_QUEUE_APPEND(keepalive_q, cs);
 
@@ -1079,6 +1080,7 @@ read_request:
                          "process_socket: apr_pollset_add failure");
             AP_DEBUG_ASSERT(rc == APR_SUCCESS);
         }
+        return;
     }
     else if (cs->pub.state == CONN_STATE_SUSPENDED) {
         apr_atomic_inc32(&suspended_count);
index f73c1582f780f528a7b461ffb28be0d9baa8c254..9c80e387204b3158975f160ade259200309894d8 100644 (file)
@@ -1124,7 +1124,7 @@ read_request:
          */
         cs->expiration_time = ap_server_conf->keep_alive_timeout +
                               apr_time_now();
-
+        c->sbh = NULL;
         /* Add work to pollset. */
         v = ap_equeue_writer_value(eq);
         v->timeout_type = TIMEOUT_KEEPALIVE;
@@ -1133,6 +1133,7 @@ read_request:
         v->tag = "process_socket(keepalive)";
         ap_equeue_writer_onward(eq);
         apr_pollset_wakeup(event_pollset);
+        return;
     }
     else if (cs->pub.state == CONN_STATE_SUSPENDED) {
         apr_atomic_inc32(&suspended_count);