Skip to content

Commit 7b1510d

Browse files
authored
Fix cancellation of refreshing AsyncPhaseAtom (#157)
1 parent 90cd87a commit 7b1510d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/Atoms/Atom/AsyncPhaseAtom.swift

+2
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ public extension AsyncPhaseAtom {
148148
#endif
149149
}
150150

151+
context.onTermination = task.cancel
152+
151153
return await withTaskCancellationHandler {
152154
await task.value
153155
return phase

0 commit comments

Comments
 (0)