Skip to content

Commit

Permalink
Merge pull request #317 from jtjacka/master
Browse files Browse the repository at this point in the history
fix timeoutAfter handler always close connection
  • Loading branch information
nuclearace committed Feb 26, 2016
2 parents 2f4c942 + 1e96d79 commit 11c0ac2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/SocketIOClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketParsable
let time = dispatch_time(DISPATCH_TIME_NOW, Int64(timeoutAfter) * Int64(NSEC_PER_SEC))

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

Expand Down

0 comments on commit 11c0ac2

Please sign in to comment.