From: Jeff Trawick Date: Wed, 20 Mar 2002 23:29:13 +0000 (+0000) Subject: in a worker thread, don't dare try to process a connection if X-Git-Tag: 2.0.34~203 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c366452ca7c5de313488e8af8a2ca835613fa205;p=thirdparty%2Fapache%2Fhttpd.git in a worker thread, don't dare try to process a connection if ap_queue_pop() failed... csd is not cleared by ap_queue_pop() so checking csd is not helpful git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94067 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 0c330bfa061..90aab59971e 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -815,11 +815,16 @@ static void * APR_THREAD_FUNC worker_thread(apr_thread_t *thd, void * dummy) rv = ap_queue_pop(worker_queue, &csd, &ptrans, last_ptrans); last_ptrans = NULL; - /* We get APR_EINTR whenever ap_queue_pop() has been interrupted - * from an explicit call to ap_queue_interrupt_all(). This allows - * us to unblock threads stuck in ap_queue_pop() when a shutdown - * is pending. */ - if (rv == APR_EINTR || !csd) { + if (rv != APR_SUCCESS) { + /* We get APR_EINTR whenever ap_queue_pop() has been interrupted + * from an explicit call to ap_queue_interrupt_all(). This allows + * us to unblock threads stuck in ap_queue_pop() when a shutdown + * is pending. + */ + if (rv != APR_EINTR) { + ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, + "ap_queue_pop failed"); + } continue; } process_socket(ptrans, csd, process_slot, thread_slot);