tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1176799 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Date Wed, 28 Sep 2011 09:35:59 GMT
Author: kkolinko
Date: Wed Sep 28 09:35:59 2011
New Revision: 1176799

URL: http://svn.apache.org/viewvc?rev=1176799&view=rev
Log:
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.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1176799&r1=1176798&r2=1176799&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Sep 28 09:35:59 2011
@@ -652,8 +652,8 @@ public class AprEndpoint extends Abstrac
             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);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message