tweak to connect timeout
This commit is contained in:
parent
de20099c07
commit
8acd32324e
@ -171,10 +171,10 @@ public final class SocketIOClient: NSObject, SocketEngineClient {
|
|||||||
|
|
||||||
let time = dispatch_time(DISPATCH_TIME_NOW, Int64(timeoutAfter) * Int64(NSEC_PER_SEC))
|
let time = dispatch_time(DISPATCH_TIME_NOW, Int64(timeoutAfter) * Int64(NSEC_PER_SEC))
|
||||||
|
|
||||||
dispatch_after(time, dispatch_get_main_queue()) {[weak self] in
|
dispatch_after(time, handleQueue) {[weak self] in
|
||||||
if self != nil && self?.status != .Connected {
|
if let this = self where this.status != .Connected {
|
||||||
self?.status = .Closed
|
this.status = .Closed
|
||||||
self?.engine?.close(fast: true)
|
this.engine?.close(fast: true)
|
||||||
|
|
||||||
handler?()
|
handler?()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user