Events won't trigger while in NSEventTrackingRunLoopMode? #62

ubermuda opened this Issue Aug 7, 2012 · 5 comments


None yet
2 participants

ubermuda commented Aug 7, 2012

Hey there,

I have an NSMenu that I want to update with items pushed to my app, but event seem not to be received in NSEventTrackingRunLoopMode.

Given the following snippet:

[channel bindToEventNamed:@"my_event" handleWithBlock:^(PTPusherEvent *event) {
    NSLog(@"event received");

And I wait for a push to occur while I maintain the menu open, I expect to receive the event immediately but I only receive it when I close the menu.

I also tried passing the main queue to bindToEventNamed:handleWithBlock:queue: (using dispatch_queue_t main_queue = dispatch_get_main_queue();), to no avail.

So I'm left wondering whether I'm doing something wrong or there's a bug in libPusher?


lukeredpath commented Aug 13, 2012

Thanks for reporting this. I'm not sure it's actually an issue with libPusher, but more of an issue with SocketRocket, the underlying websocket library.

I've opened up an issue on the SocketRocket Github tracker:


lukeredpath commented Sep 26, 2012

I've created a new branch, improved-socket-threading, which is using a new branch of SocketRocket with improved thread handling. Based on my initial tests, this seems to solve the problem, but I'll wait for @mikelikespie to merge into master before I push this in to libPusher master.

Awesome! Looking forward to it :)


lukeredpath commented Nov 29, 2012

Please try out the latest HEAD to make sure this fixes your problem. This change will make it into the next release if all is well.


@lukeredpath lukeredpath referenced this issue in facebook/SocketRocket Mar 13, 2013


Data not received when not in default runloop mode #44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment