Skip to content

Commit fd24367

Browse files
committed
Fixed Linux support
1 parent 6841f09 commit fd24367

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/HTTP/Client.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ internal extension URLSession {
3636

3737
func _data(for request: URLRequest) async throws -> (Data, URLResponse) {
3838
try await withCheckedThrowingContinuation { continuation in
39-
self.dataTask(with: request) { data, response, error in
39+
let task = self.dataTask(with: request) { data, response, error in
4040
if let error = error {
4141
continuation.resume(throwing: error)
4242
} else {
4343
continuation.resume(returning: (data ?? .init(), response!))
4444
}
4545
}
46+
task.resume()
4647
}
4748
}
4849
}

0 commit comments

Comments
 (0)