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/24 15:01:56 UTC
svn commit: r1589705 -
/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
Author: remm
Date: Thu Apr 24 13:01:55 2014
New Revision: 1589705
URL: http://svn.apache.org/r1589705
Log:
With the linger change, I am now getting async close exceptions on the accept on shutdown. Ignore exceptions when not running and cleanup.
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=1589705&r1=1589704&r2=1589705&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Thu Apr 24 13:01:55 2014
@@ -697,10 +697,14 @@ public class Nio2Endpoint extends Abstra
socket = serverSock.accept().get();
} catch (Exception e) {
countDownConnection();
- // Introduce delay if necessary
- errorDelay = handleExceptionWithDelay(errorDelay);
- // re-throw
- throw e;
+ if (running) {
+ // Introduce delay if necessary
+ errorDelay = handleExceptionWithDelay(errorDelay);
+ // re-throw
+ throw e;
+ } else {
+ break;
+ }
}
// Successful accept, reset the error delay
errorDelay = 0;
@@ -717,10 +721,6 @@ public class Nio2Endpoint extends Abstra
// Close socket right away
closeSocket(socket);
}
- } catch (NullPointerException npe) {
- if (running) {
- log.error(sm.getString("endpoint.accept.fail"), npe);
- }
} catch (Throwable t) {
ExceptionUtils.handleThrowable(t);
log.error(sm.getString("endpoint.accept.fail"), t);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org