We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57454d7 commit 33bb29eCopy full SHA for 33bb29e
Sources/EventSource/EventSource.swift
@@ -198,19 +198,10 @@ public extension EventSource {
198
}
199
200
201
- #if compiler(>=6.0)
202
continuation.onTermination = { @Sendable [weak self] _ in
203
sessionDelegateTask.cancel()
204
- Task { self?.close(stream: continuation, urlSession: urlSession) }
+ self?.close(stream: continuation, urlSession: urlSession)
205
206
- #else
207
- continuation.onTermination = { @Sendable _ in
208
- sessionDelegateTask.cancel()
209
- Task { [weak self] in
210
- await self?.close(stream: continuation, urlSession: urlSession)
211
- }
212
213
- #endif
214
215
urlSessionDataTask.resume()
216
readyState = .connecting
0 commit comments