🐛 Made watchOS URLSession wait for connectivty
This commit is contained in:
@@ -44,7 +44,13 @@ struct WebSocketPacket {
|
||||
// MARK: - Network Service
|
||||
|
||||
class NetworkService {
|
||||
private let session = URLSession.shared
|
||||
private let session: URLSession
|
||||
|
||||
init() {
|
||||
let config = URLSessionConfiguration.ephemeral
|
||||
config.waitsForConnectivity = true
|
||||
session = URLSession(configuration: config)
|
||||
}
|
||||
|
||||
// Add a serial queue for WebSocket operations
|
||||
private let webSocketQueue = DispatchQueue(label: "com.solian.websocketQueue")
|
||||
|
||||
Reference in New Issue
Block a user