]> granicus.if.org Git - apache/commitdiff
in a worker thread, don't dare try to process a connection if
authorJeff Trawick <trawick@apache.org>
Wed, 20 Mar 2002 23:29:13 +0000 (23:29 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 20 Mar 2002 23:29:13 +0000 (23:29 +0000)
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

index 0c330bfa06143477dde73e531eebdc6fcb095ec7..90aab59971e505eb72c7f4e8a42f794274239b00 100644 (file)
@@ -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);