You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2014/04/07 19:15:28 UTC
svn commit: r1585522 -
/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
Author: remm
Date: Mon Apr 7 17:15:28 2014
New Revision: 1585522
URL: http://svn.apache.org/r1585522
Log:
Fix the logic (although it shouldn't actually cause any issue).
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1585522&r1=1585521&r2=1585522&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Mon Apr 7 17:15:28 2014
@@ -433,19 +433,17 @@ public class Nio2Endpoint extends Abstra
if (threadGroup != null && internalExecutor) {
try {
threadGroup.shutdownNow();
+ long timeout = getExecutorTerminationTimeoutMillis();
+ if (timeout > 0) {
+ threadGroup.awaitTermination(timeout, TimeUnit.MILLISECONDS);
+ }
} catch (IOException e) {
getLog().warn(sm.getString("endpoint.warn.executorShutdown", getName()), e);
+ } catch (InterruptedException e) {
+ // Ignore
}
- long timeout = getExecutorTerminationTimeoutMillis();
- if (timeout > 0) {
- try {
- threadGroup.awaitTermination(timeout, TimeUnit.MILLISECONDS);
- } catch (InterruptedException e) {
- // Ignore
- }
- if (!threadGroup.isTerminated()) {
- getLog().warn(sm.getString("endpoint.warn.executorShutdown", getName()));
- }
+ if (!threadGroup.isTerminated()) {
+ getLog().warn(sm.getString("endpoint.warn.executorShutdown", getName()));
}
threadGroup = null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org