From 9747cc4ddc99885a3f909175119bdf2eed8b2197 Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 6 May 2016 10:17:43 -0400 Subject: [PATCH] allow reconnects after disconnecting --- Source/SocketIOClient.swift | 2 -- Source/SocketPacket.swift | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/SocketIOClient.swift b/Source/SocketIOClient.swift index 02cda38..f0f12c0 100644 --- a/Source/SocketIOClient.swift +++ b/Source/SocketIOClient.swift @@ -191,7 +191,6 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable DefaultSocketLogger.Logger.log("Disconnected: %@", type: logType, args: reason) status = .Disconnected - reconnects = false // Make sure the engine is actually dead. engine?.disconnect(reason) @@ -205,7 +204,6 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable DefaultSocketLogger.Logger.log("Closing socket", type: logType) - reconnects = false didDisconnect("Disconnect") } diff --git a/Source/SocketPacket.swift b/Source/SocketPacket.swift index 0de5485..2f039c1 100644 --- a/Source/SocketPacket.swift +++ b/Source/SocketPacket.swift @@ -189,7 +189,7 @@ struct SocketPacket { // Helper method that looks for placeholders // If object is a collection it will recurse - // Returns the object if it is not a placeholder string or the corresponding + // Returns the object if it is not a placeholder or the corresponding // binary data private func _fillInPlaceholders(object: AnyObject) -> AnyObject { switch object {