Skip to content

[Correctness] ServiceHelper.cs — StopServices throws on first failure, remaining services left running #590

@Christophe-Rogiers

Description

@Christophe-Rogiers

Severity: Warning

File: src/Servy.Core/Helpers/ServiceHelper.cs
Lines: 138–183

Description:
Unlike StartServices which collects errors into an AggregateException and continues, StopServices throws immediately on the first failure. If multiple services need to be stopped and the first one fails, the rest are never stopped.

Suggested fix:
Collect stop failures into a list and throw an AggregateException after attempting all services, matching the pattern used in StartServices.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions