zwopple / PocketSocket

Objective-C websocket library for building things that work in realtime on iOS and OS X.
Other
414 stars 129 forks source link

Server-opened sockets always dispatch through main queue #30

Closed snej closed 8 years ago

snej commented 9 years ago

PSWebSockets opened by PSWebSocketServer don't have any delegateQueue set. That means they call their delegate methods on the main thread. This doesn't affect the client directly, because those delegate calls get handled by the server and dispatched to its delegate on a different queue; however it means that if the main thread is busy, those delegate calls will get delayed or blocked. It would be better to avoid going through the main queue at all.

robertjpayne commented 8 years ago

This is now fixed in develop thanks!