I am cancelling or disconnecting an active WebSocket task using the following code
socket.cancel(with: .goingAway, reason: nil)
Is there any way to reconnect back or should we create a new URLSessionWebSocketTask and resume again ?
I am cancelling or disconnecting an active WebSocket task using the following code
socket.cancel(with: .goingAway, reason: nil)
Is there any way to reconnect back or should we create a new URLSessionWebSocketTask and resume again ?
You should create a new URLSessionWebSocketTask and resume again.