]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix silly bug. accept() has to be inside the accept mutexed block. doh.
authorManoj Kasichainula <manoj@apache.org>
Wed, 21 Jul 1999 22:32:36 +0000 (22:32 +0000)
committerManoj Kasichainula <manoj@apache.org>
Wed, 21 Jul 1999 22:32:36 +0000 (22:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83481 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/mpmt_pthread/mpmt_pthread.c

index 324c70ef6b640b0448f554848f471c6ecfebaac0..c5cf011a2de1ce0b435cc9f85dc0539660272d77 100644 (file)
@@ -950,10 +950,16 @@ static void * worker_thread(void * dummy)
             }
         }
     got_fd:
-        SAFE_ACCEPT(accept_mutex_off(0));
-        SAFE_ACCEPT(intra_mutex_off(0));
-        if (workers_may_exit) break;
-        csd = ap_accept(sd, &sa_client, &len);
+        if (!workers_may_exit) {
+            csd = ap_accept(sd, &sa_client, &len);
+            SAFE_ACCEPT(accept_mutex_off(0));
+            SAFE_ACCEPT(intra_mutex_off(0));
+        }
+        else {
+            SAFE_ACCEPT(accept_mutex_off(0));
+            SAFE_ACCEPT(intra_mutex_off(0));
+            break;
+        }
         process_socket(ptrans, &sa_client, csd, process_slot, thread_slot);
         ap_clear_pool(ptrans);
         requests_this_child--;