Hey. Tell me please, can I do reconnect this way:
socket.onDisconnect = { (error: error?) in {
self.socket.connect ()
}
At such attempt I have errors in the console and when I call connect () I do not get into onDisconnect {} any more. :( The main thing is that on swift 3 this method worked.
I ask you to give advice on how to improve my code. Thank you in advance for your cooperation.
Hey. Tell me please, can I do reconnect this way:
socket.onDisconnect = { (error: error?) in {
self.socket.connect ()
}
At such attempt I have errors in the console and when I call connect () I do not get into onDisconnect {} any more. :( The main thing is that on swift 3 this method worked.
I ask you to give advice on how to improve my code. Thank you in advance for your cooperation.