This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 650cb85ad2871a108c142be7ebf2de67687fe887 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Apr 2 21:23:51 2020 +0100 Log exceptions when closing the server socket and don't re-throw Running the unit tests on MacOS I saw a test failure caused by an exception as this point. I've never seen an exception here before. It certainly isn't repeatable. On balance, logging the exception and completing the rest of the Connector shutdown cleanly looks to be the better option. --- java/org/apache/tomcat/util/net/NioEndpoint.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index 4e67f7e..a50b721 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -330,7 +330,11 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel> { if (running) { stop(); } - doCloseServerSocket(); + try { + doCloseServerSocket(); + } catch (IOException ioe) { + getLog().warn(sm.getString("endpoint.serverSocket.closeFailed", getName()), ioe); + } destroySsl(); super.unbind(); if (getHandler() != null ) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org