- As suggested by a couple people, start accepting after starting everything else...
authorremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 8 Aug 2007 14:55:33 +0000 (14:55 +0000)
committerremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 8 Aug 2007 14:55:33 +0000 (14:55 +0000)
  initialized fields.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@563905 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/AprEndpoint.java

index b23a9ef..4e0161b 100644 (file)
@@ -725,14 +725,6 @@ public class AprEndpoint {
                 workers = new WorkerStack(maxThreads);
             }
 
-            // Start acceptor threads
-            for (int i = 0; i < acceptorThreadCount; i++) {
-                Thread acceptorThread = new Thread(new Acceptor(), getName() + "-Acceptor-" + i);
-                acceptorThread.setPriority(threadPriority);
-                acceptorThread.setDaemon(daemon);
-                acceptorThread.start();
-            }
-
             // Start poller threads
             pollers = new Poller[pollerThreadCount];
             for (int i = 0; i < pollerThreadCount; i++) {
@@ -767,6 +759,15 @@ public class AprEndpoint {
                     sendfileThread.start();
                 }
             }
+
+            // Start acceptor threads
+            for (int i = 0; i < acceptorThreadCount; i++) {
+                Thread acceptorThread = new Thread(new Acceptor(), getName() + "-Acceptor-" + i);
+                acceptorThread.setPriority(threadPriority);
+                acceptorThread.setDaemon(daemon);
+                acceptorThread.start();
+            }
+
         }
     }