From: remm Date: Wed, 8 Aug 2007 14:55:33 +0000 (+0000) Subject: - As suggested by a couple people, start accepting after starting everything else... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=09bf2babf47ded3b3d16a3d0c145279d3977ab68;p=tomcat7.0 - As suggested by a couple people, start accepting after starting everything else, to avoid running into non initialized fields. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@563905 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index b23a9ef5d..4e0161bb3 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -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(); + } + } }