Open dhilowitz opened 9 years ago
OK. I think I've worked around the issue by forcing the contents of the callback block into the main thread:
[self.socket on: @"chatMessage" callback: ^(SIOParameterArray *args)
{
[[NSOperationQueue mainQueue] addOperationWithBlock:^ {
[self chatMessageReceived];
}];
}];
Checkout the discussion in #16 there are serious threading issues right now. I'll try and get a proper pull request in soon, but I have the threading issues mostly resolved in this branch: https://github.com/syrp/SIOSocket
Hi,
I'm running v0.2.2 of SIOSocket, and I'm getting an EXC_BAD_ACCESS exception in WebThread. Here's an XCode screenshot:
I have a callback function set up so that when I receive an event called "chatMessage" I run a block of code. Something like this:
This in calls a function which updates a badge counter on a bar button like so:
Which is accomplished in the bar button code as follows:
Looking at the inspector, it seems as thought UIView is not defined? Is this because we are running in the wrong thread?