dispatch events on main queue
This commit is contained in:
parent
5d8479ed36
commit
44de79d8c5
@ -248,6 +248,7 @@ class SocketIOClient: NSObject, SRWebSocketDelegate {
|
||||
func handleEvent(event:String, data:AnyObject?, isInternalMessage:Bool = false,
|
||||
wantsAck ack:Int? = nil, withAckType ackType:Int = 3) {
|
||||
// println("Should do event: \(event) with data: \(data)")
|
||||
dispatch_async(dispatch_get_main_queue()) {
|
||||
if !self.connected && !isInternalMessage {
|
||||
return
|
||||
}
|
||||
@ -270,6 +271,7 @@ class SocketIOClient: NSObject, SRWebSocketDelegate {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func joinNamespace() {
|
||||
if self.nsp != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user