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
This commit is contained in:
Vladislav Khorev 2016-12-30 19:49:48 +03:00 committed by GitHub
parent 494f3fa199
commit f943f41895

View File

@ -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
}
}