This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 329fbb1 SpotBugs warnings. Log problems stopping acceptor threads 329fbb1 is described below commit 329fbb14fe61b713c3cf56dceef082a29b69cb9e Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Oct 16 09:39:24 2020 +0100 SpotBugs warnings. Log problems stopping acceptor threads --- java/org/apache/tomcat/util/net/Acceptor.java | 6 ++++-- java/org/apache/tomcat/util/net/LocalStrings.properties | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/net/Acceptor.java b/java/org/apache/tomcat/util/net/Acceptor.java index 9fa0818..2927b6f 100644 --- a/java/org/apache/tomcat/util/net/Acceptor.java +++ b/java/org/apache/tomcat/util/net/Acceptor.java @@ -159,9 +159,11 @@ public class Acceptor<U> implements Runnable { public void stop() { stopCalled = true; try { - stopLatch.await(10, TimeUnit.SECONDS); + if (!stopLatch.await(10, TimeUnit.SECONDS)) { + log.warn(sm.getString("acceptor.stop.fail", getThreadName())); + } } catch (InterruptedException e) { - // Ignore + log.warn(sm.getString("acceptor.stop.interrupted", getThreadName()), e); } } diff --git a/java/org/apache/tomcat/util/net/LocalStrings.properties b/java/org/apache/tomcat/util/net/LocalStrings.properties index e47c7ca..5d6237d 100644 --- a/java/org/apache/tomcat/util/net/LocalStrings.properties +++ b/java/org/apache/tomcat/util/net/LocalStrings.properties @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +acceptor.stop.fail= The acceptor thread [{0}] did not stop cleanly +acceptor.stop.interrupted=Interrupt was received while waiting for the acceptor thread [{0}] to stop + channel.nio.interrupted=The current thread was interrupted channel.nio.ssl.appInputNotEmpty=Application input buffer still contains data. Data would have been lost. channel.nio.ssl.appOutputNotEmpty=Application output buffer still contains data. Data would have been lost. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org