Ping relays on resume, if there's an error then try to reconnect
This is an attempt to fix the fail-to-reconnect issues. Let's see if it works.
This commit is contained in:
@@ -32,6 +32,10 @@ final class WebSocket: NSObject, URLSessionWebSocketDelegate {
|
||||
self.session = session
|
||||
}
|
||||
|
||||
func ping(receiveHandler: @escaping (Error?) -> Void) {
|
||||
self.webSocketTask.sendPing(pongReceiveHandler: receiveHandler)
|
||||
}
|
||||
|
||||
func connect() {
|
||||
resume()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user