From: Eric Covener Date: Tue, 24 Jun 2014 12:34:52 +0000 (+0000) Subject: followup to r1604350, move the c->sbh assignment to immediately before the X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7edb8179c8821ae27d5d0d1135bdd99bae09ce4;p=thirdparty%2Fapache%2Fhttpd.git followup to r1604350, move the c->sbh assignment to immediately before the 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 Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1605067 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index 161d0b4b6f0..2d96189fcb2 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -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)) {