diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/component/ContainerLifeCycle.java b/jetty-util/src/main/java/org/eclipse/jetty/util/component/ContainerLifeCycle.java index 2457a9043ec..2e1311821fa 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/component/ContainerLifeCycle.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/component/ContainerLifeCycle.java @@ -538,7 +538,9 @@ public class ContainerLifeCycle extends AbstractLifeCycle implements Container, { try { - stop((LifeCycle)bean._bean); + LifeCycle lc=(LifeCycle)bean._bean; + if (lc.isRunning()) + stop(lc); } catch(RuntimeException | Error e) {