]> granicus.if.org Git - apache/commitdiff
Move the timeout mutex up, to limit the time we are holding it.
authorPaul Querna <pquerna@apache.org>
Fri, 9 Sep 2005 15:24:43 +0000 (15:24 +0000)
committerPaul Querna <pquerna@apache.org>
Fri, 9 Sep 2005 15:24:43 +0000 (15:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@279794 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/experimental/event/event.c

index 4ccd0caf6f7099058e1acd8348806192f25e8ca0..1d12e6d5e050f7085274f1de7dffde913a40fcf3 100644 (file)
@@ -660,13 +660,12 @@ static int process_socket(apr_pool_t * p, apr_socket_t * sock,
         cs->expiration_time = ap_server_conf->keep_alive_timeout + time_now;
         apr_thread_mutex_lock(timeout_mutex);
         APR_RING_INSERT_TAIL(&timeout_head, cs, conn_state_t, timeout_list);
+        apr_thread_mutex_unlock(timeout_mutex);
 
         pt->status = 0;
         /* Add work to pollset. These are always read events */
         rc = apr_pollset_add(event_pollset, &cs->pfd);
 
-        apr_thread_mutex_unlock(timeout_mutex);
-
         if (rc != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf,
                          "process_socket: apr_pollset_add failure");