From 7b9c53e3146fb0c962e570188e84590708f319de Mon Sep 17 00:00:00 2001 From: Eric Jensen Date: Mon, 3 Apr 2023 12:46:03 -0400 Subject: [PATCH] Use the default queue for the URLSession created within URLSessionTransport --- Sources/SwiftPhoenixClient/PhoenixTransport.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/SwiftPhoenixClient/PhoenixTransport.swift b/Sources/SwiftPhoenixClient/PhoenixTransport.swift index 65005b61..6d085c89 100644 --- a/Sources/SwiftPhoenixClient/PhoenixTransport.swift +++ b/Sources/SwiftPhoenixClient/PhoenixTransport.swift @@ -137,10 +137,10 @@ open class URLSessionTransport: NSObject, PhoenixTransport, URLSessionWebSocketD /// The URL to connect to internal let url: URL - /// The URLSession configuratio + /// The URLSession configuration internal let configuration: URLSessionConfiguration - /// The underling URLsession. Assigned during `connect()` + /// The underling URLSession. Assigned during `connect()` private var session: URLSession? = nil /// The ongoing task. Assigned during `connect()` @@ -195,7 +195,7 @@ open class URLSessionTransport: NSObject, PhoenixTransport, URLSessionWebSocketD self.readyState = .connecting // Create the session and websocket task - self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: OperationQueue()) + self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil) self.task = self.session?.webSocketTask(with: url) // Start the task