fix test
This commit is contained in:
parent
e57bcba47d
commit
02f30a81dd
@ -13,7 +13,7 @@ class SocketParserTest: XCTestCase {
|
|||||||
let testSocket = SocketIOClient(socketURL: NSURL())
|
let testSocket = SocketIOClient(socketURL: NSURL())
|
||||||
|
|
||||||
//Format key: message; namespace-data-binary-id
|
//Format key: message; namespace-data-binary-id
|
||||||
static let packetTypes: Dictionary<String, (String, [AnyObject], [NSData], Int)> = [
|
static let packetTypes: [String: (String, [AnyObject], [NSData], Int)] = [
|
||||||
"0": ("/", [], [], -1), "1": ("/", [], [], -1),
|
"0": ("/", [], [], -1), "1": ("/", [], [], -1),
|
||||||
"25[\"test\"]": ("/", ["test"], [], 5),
|
"25[\"test\"]": ("/", ["test"], [], 5),
|
||||||
"2[\"test\",\"~~0\"]": ("/", ["test", "~~0"], [], -1),
|
"2[\"test\",\"~~0\"]": ("/", ["test", "~~0"], [], -1),
|
||||||
|
|||||||
@ -274,13 +274,15 @@ public final class SocketEngine : NSObject, SocketEnginePollable, SocketEngineWe
|
|||||||
|
|
||||||
ws?.disconnect()
|
ws?.disconnect()
|
||||||
stopPolling()
|
stopPolling()
|
||||||
client?.engineDidClose(reason)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guard connected else { return postSendClose(nil, nil, nil) }
|
||||||
|
|
||||||
DefaultSocketLogger.Logger.log("Engine is being closed.", type: logType)
|
DefaultSocketLogger.Logger.log("Engine is being closed.", type: logType)
|
||||||
|
|
||||||
if closed || !connected {
|
if closed {
|
||||||
postSendClose(nil, nil, nil)
|
postSendClose(nil, nil, nil)
|
||||||
|
client?.engineDidClose(reason)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user