]> granicus.if.org Git - apache/commitdiff
Only process a connection if we've actually accepted one.
authorManoj Kasichainula <manoj@apache.org>
Wed, 27 Oct 1999 06:11:21 +0000 (06:11 +0000)
committerManoj Kasichainula <manoj@apache.org>
Wed, 27 Oct 1999 06:11:21 +0000 (06:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84041 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/dexter/dexter.c
server/mpm/mpmt_pthread/mpmt_pthread.c

index 7a1be0d4d9470b86caab89a42d69488ee6bc0059..402fe476e2b0b0fcbfcc24c4e6037a47bcfd4b73 100644 (file)
@@ -936,6 +936,8 @@ static void *worker_thread(void *arg)
                 }
             }
             pthread_mutex_unlock(&idle_thread_count_mutex);
+            process_socket(ptrans, csd, conn_id);
+            requests_this_child--;
        } else {
             SAFE_ACCEPT(accept_mutex_off(0));
             SAFE_ACCEPT(intra_mutex_off(0));
@@ -944,9 +946,7 @@ static void *worker_thread(void *arg)
             pthread_mutex_unlock(&idle_thread_count_mutex);
            break;
        }
-        process_socket(ptrans, csd, conn_id);
         ap_clear_pool(ptrans);
-        requests_this_child--;
     }
 
     ap_destroy_pool(tpool);
index cfc60fe3fbf482a071a16e937d8a0d7709f9cedb..dddb9ca8544c7456daff72b5bc22a98b884faf55 100644 (file)
@@ -879,15 +879,15 @@ static void * worker_thread(void * dummy)
             ap_accept(&csd, sd, ptrans);
             SAFE_ACCEPT(accept_mutex_off(0));
             SAFE_ACCEPT(intra_mutex_off(0));
+            process_socket(ptrans, csd, process_slot, thread_slot);
+            requests_this_child--;
         }
         else {
             SAFE_ACCEPT(accept_mutex_off(0));
             SAFE_ACCEPT(intra_mutex_off(0));
             break;
         }
-        process_socket(ptrans, csd, process_slot, thread_slot);
         ap_clear_pool(ptrans);
-        requests_this_child--;
     }
 
     ap_destroy_pool(tpool);