Skip to content

armgit / xtool

Public Imported from GitHub
0

Cross-platform Xcode replacement. Build and deploy iOS apps with SwiftPM on Linux, Windows, macOS.

Fix URLSession WebSocket client

Kabir Oberaie3d89f036ed0
diff --git a/Sources/Supersign/HTTPClientProtocol/URLSession+HTTP.swift b/Sources/Supersign/HTTPClientProtocol/URLSession+HTTP.swift
index dfa5de2..dbd0362 100644
--- a/Sources/Supersign/HTTPClientProtocol/URLSession+HTTP.swift
+++ b/Sources/Supersign/HTTPClientProtocol/URLSession+HTTP.swift
@@ -144,6 +144,7 @@ private final class Client: HTTPClientProtocol {
eventContinuation.finish()
}
}
+ task.resume()
let code = await event.first { _ in true } ?? nil
if let code { throw Errors.webSocketClosed(code) }
return WebSocketSessionWrapper(task: task)