File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ public struct LifecycleHandler {
104104extension LifecycleHandler {
105105 public init ( _ handler: @escaping ( ) async throws -> Void ) {
106106 self = LifecycleHandler { callback in
107- detach {
107+ Task {
108108 do {
109109 try await handler ( )
110110 callback ( nil )
@@ -168,7 +168,7 @@ public struct LifecycleStartHandler<State> {
168168extension LifecycleStartHandler {
169169 public init ( _ handler: @escaping ( ) async throws -> State ) {
170170 self = LifecycleStartHandler { callback in
171- detach {
171+ Task {
172172 do {
173173 let state = try await handler ( )
174174 callback ( . success( state) )
@@ -230,7 +230,7 @@ public struct LifecycleShutdownHandler<State> {
230230extension LifecycleShutdownHandler {
231231 public init ( _ handler: @escaping ( State ) async throws -> Void ) {
232232 self = LifecycleShutdownHandler { state, callback in
233- detach {
233+ Task {
234234 do {
235235 try await handler ( state)
236236 callback ( nil )
You can’t perform that action at this time.
0 commit comments