This repository was archived by the owner on Oct 18, 2021. It is now read-only.

Description
The socket context makes the CFSocket retain and release its owner, why?
CFSocketContext ctxt = { 0, (__bridge void *)(self), CFRetain, CFRelease, NULL };
there should be no reason to do that, since you're invalidating and releasing the socket on dealloc. Creating the socket using the context like:
CFSocketContext ctxt = { 0, (__bridge void *)(self), NULL, NULL, NULL };
seems to work fine. This fixes the deadlock problem I was having, but I'm unsure as to whether the retain/release socket context is on purpose.