]> granicus.if.org Git - apache/commitdiff
followup to r1604350, move the c->sbh assignment to immediately before the
authorEric Covener <covener@apache.org>
Tue, 24 Jun 2014 12:34:52 +0000 (12:34 +0000)
committerEric Covener <covener@apache.org>
Tue, 24 Jun 2014 12:34:52 +0000 (12:34 +0000)
socket is added to the timeout queue. Technically not needed because we hold
the lock on the timeout queue, but more consistent with other blocks that
leave the thread.

Submitted By: Edward Lu <Chaosed0 gmail com>
Committed By: covener

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

server/mpm/event/event.c

index 161d0b4b6f0b4ca651594292d28f551d5ceafeed..2d96189fcb2ab937eb8d5e3c2387c74cc9bb318d 100644 (file)
@@ -840,12 +840,12 @@ static int start_lingering_close_common(event_conn_state_t *cs)
     }
     apr_atomic_inc32(&lingering_count);
     apr_thread_mutex_lock(timeout_mutex);
+    cs->c->sbh = NULL;
     TO_QUEUE_APPEND(*q, cs);
     cs->pfd.reqevents = (
             cs->pub.sense == CONN_SENSE_WANT_WRITE ? APR_POLLOUT :
                     APR_POLLIN) | APR_POLLHUP | APR_POLLERR;
     cs->pub.sense = CONN_SENSE_DEFAULT;
-    cs->c->sbh = NULL;
     rv = apr_pollset_add(event_pollset, &cs->pfd);
     apr_thread_mutex_unlock(timeout_mutex);
     if (rv != APR_SUCCESS && !APR_STATUS_IS_EEXIST(rv)) {