Skip to content

Errors thrown from SmartLifeycle#stop results in (unnecessary) waiting for the shutdown timeout #33442

@joshiste

Description

@joshiste

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)

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions