This commit is contained in:
parent
4dd882b8ad
commit
877db516c2
@ -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()) {
|
dispatch_after(time, dispatch_get_main_queue()) {[weak self] in
|
||||||
if self.status != .Connected {
|
if self != nil && self?.status != .Connected {
|
||||||
self.status = .Closed
|
self?.status = .Closed
|
||||||
self.engine?.close(fast: true)
|
self?.engine?.close(fast: true)
|
||||||
|
|
||||||
handler?()
|
handler?()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user