From 2e7cb84d67729b8a4147e0abb96a1c4bef8c3ddf Mon Sep 17 00:00:00 2001 From: mturk Date: Fri, 3 Sep 2010 04:26:23 +0000 Subject: [PATCH] Store the Acceptor instances in the array like we do for other threads 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index 26fa62da7..2d5871607 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -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(); -- 2.11.0