Avoid shutdown timeout in case of exception on stop

Closes gh-33442
This commit is contained in:
Juergen Hoeller
2024-08-31 12:00:26 +02:00
parent 5d80d75051
commit 1db9faf248

View File

@@ -371,6 +371,9 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
if (logger.isWarnEnabled()) {
logger.warn("Failed to stop bean '" + beanName + "'", ex);
}
if (bean instanceof SmartLifecycle) {
latch.countDown();
}
}
}
}