diff --git a/Sources/ServiceLifecycle/GracefulShutdown.swift b/Sources/ServiceLifecycle/GracefulShutdown.swift index e8aad32..43be472 100644 --- a/Sources/ServiceLifecycle/GracefulShutdown.swift +++ b/Sources/ServiceLifecycle/GracefulShutdown.swift @@ -80,7 +80,7 @@ public func cancelOnGracefulShutdown(_ operation: @Sendable @escaping () asyn } let result = try await group.next() - group.cancelAll() // currently needed, as the group does not always auto-cancel tasks on return + group.cancelAll() switch result { case .value(let t):