diff --git a/Sources/Hummingbird/Application.swift b/Sources/Hummingbird/Application.swift index 631b3c80c..3bfee343b 100644 --- a/Sources/Hummingbird/Application.swift +++ b/Sources/Hummingbird/Application.swift @@ -116,13 +116,11 @@ extension HBApplicationProtocol { eventLoopGroup: self.eventLoopGroup, logger: self.logger ) - try await withGracefulShutdownHandler { - let services: [any Service] = [server, dateCache] + self.services - let serviceGroup = ServiceGroup( - configuration: .init(services: services, logger: self.logger) - ) - try await serviceGroup.run() - } onGracefulShutdown: {} + let services: [any Service] = [server, dateCache] + self.services + let serviceGroup = ServiceGroup( + configuration: .init(services: services, logger: self.logger) + ) + try await serviceGroup.run() } /// Helper function that runs application inside a ServiceGroup which will gracefully