From 09bf2babf47ded3b3d16a3d0c145279d3977ab68 Mon Sep 17 00:00:00 2001 From: remm Date: Wed, 8 Aug 2007 14:55:33 +0000 Subject: [PATCH] - 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 --- java/org/apache/tomcat/util/net/AprEndpoint.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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(); + } + } } -- 2.11.0