This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 7b446e2cd7 Fix excessive log messages on web application stop
7b446e2cd7 is described below
commit 7b446e2cd7979cba836927a6201d368ca7de2d44
Author: Mark Thomas <[email protected]>
AuthorDate: Fri May 29 15:07:49 2026 +0100
Fix excessive log messages on web application stop
---
java/org/apache/catalina/core/StandardPipeline.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/java/org/apache/catalina/core/StandardPipeline.java
b/java/org/apache/catalina/core/StandardPipeline.java
index 23385816a0..29fa0e5197 100644
--- a/java/org/apache/catalina/core/StandardPipeline.java
+++ b/java/org/apache/catalina/core/StandardPipeline.java
@@ -381,10 +381,12 @@ public class StandardPipeline extends LifecycleBase
implements Pipeline {
}
if (valve instanceof Lifecycle) {
- try {
- ((Lifecycle) valve).stop();
- } catch (LifecycleException e) {
- log.error(sm.getString("standardPipeline.valve.stop"), e);
+ if (((Lifecycle) valve).getState().isAvailable()) {
+ try {
+ ((Lifecycle) valve).stop();
+ } catch (LifecycleException e) {
+ log.error(sm.getString("standardPipeline.valve.stop"), e);
+ }
}
try {
((Lifecycle) valve).destroy();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]