                 println("--- \(SocketIO.name): Event handler")
                 println("call event: \"\(event)\"")
             #endif
-            currentCallback(SocketIOArg.Message(message: message))
+            dispatch_async(dispatch_get_main_queue()) {
+                currentCallback(SocketIOArg.Message(message: message))
+            }
         }
         else {
             #if DEBUG

            println("call global events: \(globalEvents.count)")
        #endif
        for callback in globalEvents {
            callback(SocketIOArg.Message(message: message))
        }
    }
    

                println("--- \(SocketIO.name): Event handler")
                println("call event: \"\(event)\"")
            #endif
            dispatch_async(dispatch_get_main_queue()) {
                currentCallback(SocketIOArg.Failure(error))
            }
        }
        else {
            #if DEBUG
