Skip to content

Commit 1db9faf

Browse files
committed
Avoid shutdown timeout in case of exception on stop
Closes gh-33442
1 parent 5d80d75 commit 1db9faf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java

+3
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,9 @@ else if (bean instanceof SmartLifecycle) {
371371
if (logger.isWarnEnabled()) {
372372
logger.warn("Failed to stop bean '" + beanName + "'", ex);
373373
}
374+
if (bean instanceof SmartLifecycle) {
375+
latch.countDown();
376+
}
374377
}
375378
}
376379
}

0 commit comments

Comments
 (0)