From 494f3fa199bc456f3208e137e261addeb24ac51f Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Mon, 26 Dec 2016 12:40:14 +0300 Subject: [PATCH 1/2] Update SocketEngine.swift Fix issue #101 https://github.com/socketio/socket.io-client-swift/issues/101 --- Source/SocketEngine.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/SocketEngine.swift b/Source/SocketEngine.swift index 6caf87e..7a9f6c7 100644 --- a/Source/SocketEngine.swift +++ b/Source/SocketEngine.swift @@ -523,6 +523,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll connected = true probing = false polling = false + pongsMissed = 0 } } From f943f41895a536861606c91519c1dc6b9ad8d1fe Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Fri, 30 Dec 2016 19:49:48 +0300 Subject: [PATCH 2/2] Update SocketEngine.swift Fix issue #101 Place code in handleOpen, according to suggestion: https://github.com/socketio/socket.io-client-swift/pull/602#issuecomment-269233001 --- Source/SocketEngine.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/SocketEngine.swift b/Source/SocketEngine.swift index 7a9f6c7..7fa489e 100644 --- a/Source/SocketEngine.swift +++ b/Source/SocketEngine.swift @@ -372,6 +372,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll self.sid = sid connected = true + pongsMissed = 0 if let upgrades = json["upgrades"] as? [String] { upgradeWs = upgrades.contains("websocket") @@ -523,7 +524,6 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll connected = true probing = false polling = false - pongsMissed = 0 } }