Errors thrown from SmartLifeycle#stop results in (unnecessary) waiting for the shutdown timeout #33442
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
When the stop method of a SmartLifecycle bean throws an error, the DefaultLifecycleProcessor always waits until the timeout is hit. Which is unnecessary as no cleanup is performed and delays the shutdown.
Imho when calling the stop() method the DefaultLifecycleProcessor should also do a
latch.countDown
in case an exception is thrown.(In our case we had a stop method which was interacting with the database. When we did some DB failover testing, this method has thrown some exception and the shutdown got delayed)
The text was updated successfully, but these errors were encountered: