From 7d278dab8c1168dd863a9e6d9cf722e5ce5fa43a Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 20 Mar 2002 23:29:13 +0000 Subject: [PATCH] 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 --- server/mpm/worker/worker.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 0c330bfa06..90aab59971 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); -- 2.40.0