Skip to content

Commit 6fa5ce9

Browse files
committed
don't call connect timeout if status is closed
1 parent 43b2d46 commit 6fa5ce9

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
@@ -171,7 +171,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketParsable
171171
let time = dispatch_time(DISPATCH_TIME_NOW, Int64(timeoutAfter) * Int64(NSEC_PER_SEC))
172172

173173
dispatch_after(time, handleQueue) {[weak self] in
174-
if let this = self where this.status != .Connected {
174+
if let this = self where this.status != .Connected || this.status != .Closed {
175175
this.status = .Closed
176176
this.engine?.close("Connect timeout")
177177

0 commit comments

Comments
 (0)