Store the Acceptor instances in the array like we do for other threads
authormturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 3 Sep 2010 04:26:23 +0000 (04:26 +0000)
committermturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 3 Sep 2010 04:26:23 +0000 (04:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@992199 13f79535-47bb-0310-9956-ffa450edef68

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

index 26fa62d..2d58716 100644 (file)
@@ -92,6 +92,9 @@ public class AprEndpoint extends AbstractEndpoint {
     protected long sslContext = 0;
 
 
+    private Acceptor acceptors[] = null;
+
+
     // ------------------------------------------------------------- Properties
 
 
@@ -570,8 +573,10 @@ public class AprEndpoint extends AbstractEndpoint {
             }
 
             // Start acceptor threads
+            acceptors = new Acceptor[acceptorThreadCount];
             for (int i = 0; i < acceptorThreadCount; i++) {
-                Thread acceptorThread = new Thread(new Acceptor(), getName() + "-Acceptor-" + i);
+                acceptors[i] = new Acceptor();
+                Thread acceptorThread = new Thread(acceptors[i], getName() + "-Acceptor-" + i);
                 acceptorThread.setPriority(threadPriority);
                 acceptorThread.setDaemon(getDaemon());
                 acceptorThread.start();