From: kkolinko Date: Wed, 28 Sep 2011 09:35:59 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51905 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8209100d485b3bd70cc5098bf3474f551c1ce893;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51905 Skip attempt to shutdown AprEndpoint acceptor threads if the server socket has been already forcefully closed. Reduce waiting timeout from 30s to 10s. I think if things go wrong 10s is enough to wait. If it were waiting 30s - the JVM itself might be forcefully closed by service wrapper as unresponsive. - it must print something to the logs, otherwise it looks odd. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1176799 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 7534cfbd4..c0b279dce 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -652,8 +652,8 @@ public class AprEndpoint extends AbstractEndpoint { running = false; unlockAccept(); for (int i = 0; i < acceptors.length; i++) { - long s = System.currentTimeMillis() + 30000; - while (acceptors[i].isAlive()) { + long s = System.currentTimeMillis() + 10000; + while (acceptors[i].isAlive() && serverSock != 0) { try { acceptors[i].interrupt(); acceptors[i].join(1000);