fix socketio/socket.io-client-swift#110 calling close while trying to reconnect
This commit is contained in:
parent
846897157c
commit
283644b75c
@ -481,7 +481,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketLogClient
|
||||
|
||||
// We lost connection and should attempt to reestablish
|
||||
@objc private func tryReconnect() {
|
||||
if reconnectAttempts != -1 && currentReconnectAttempt + 1 > reconnectAttempts {
|
||||
if reconnectAttempts != -1 && currentReconnectAttempt + 1 > reconnectAttempts || !reconnects {
|
||||
didDisconnect("Reconnect Failed")
|
||||
return
|
||||
} else if connected {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user