2

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 ?

subin272
  • 733
  • 6
  • 24

1 Answers1

0

You should create a new URLSessionWebSocketTask and resume again.

Miguel Maia
  • 36
  • 1
  • 5