Skip to content

Commit 11c0ac2

Browse files
committed
Merge pull request #317 from jtjacka/master
fix timeoutAfter handler always close connection
2 parents 2f4c942 + 1e96d79 commit 11c0ac2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/SocketIOClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketParsable
169169
let time = dispatch_time(DISPATCH_TIME_NOW, Int64(timeoutAfter) * Int64(NSEC_PER_SEC))
170170

171171
dispatch_after(time, handleQueue) {[weak self] in
172-
if let this = self where this.status != .Connected || this.status != .Closed {
172+
if let this = self where this.status != .Connected && this.status != .Closed {
173173
this.status = .Closed
174174
this.engine?.disconnect("Connect timeout")
175175

0 commit comments

Comments
 (0)