We've just a couple of crash reports from a user, who is seeing an
issue when a search is terminated.
We haven't see this before, in fact haven't really seen any Bonjour
issues, or even looked at this code, for ages.
IIRC, the code, which I've pasted below is based pretty closely on
some sample code, probably including what appear to be some commented
out workarounds.
/* Remove the CFRunLoopSource from the current run loop. */
CFRunLoopRemoveSource(CFRunLoopGetCurrent(), serviceState->source,
kCFRunLoopCommonModes);
CFRelease(serviceState->source);
/* Invalidate the CFSocket. */
CFSocketInvalidate(serviceState->socket);
CFRelease(serviceState->socket);
/* Workaround that gives time to CFSocket's select thread so it
can remove the socket from its FD set
before we close the socket by calling DNSServiceRefDeallocate.
<rdar://problem/3585273> */
// usleep(1000);
/* Terminate the connection with the mDNSResponder daemon, which
cancels the operation. */
DNSServiceRefDeallocate(serviceState->service);
// if (ref->timer) {
//
// /* Cancel the CFTimer and remove the CFTimer from the runloop. */
// CFRunLoopTimerInvalidate(ref->timer);
// CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), ref->timer,
kCFRunLoopCommonModes);
// }
//
free(serviceState);
serviceState = NULL;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bonjour-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/bonjour-dev/email@hidden