Revert "Use run loop instead of dispatch queue as unscheduling via NULL queue is triggering errors. refs #408"

This reverts commit fa6cff8221.
This commit is contained in:
Blake Watters
2011-10-20 11:55:00 -04:00
parent fa6cff8221
commit a863da18ec

View File

@@ -337,8 +337,8 @@ static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReach
return;
}
if (! SCNetworkReachabilityScheduleWithRunLoop(_reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)) {
RKLogWarning("%@: SCNetworkReachabilityScheduleWithRunLoop() failed: %s", self, SCErrorString(SCError()));
if (! SCNetworkReachabilitySetDispatchQueue(_reachabilityRef, dispatch_get_main_queue())) {
RKLogWarning("%@: SCNetworkReachabilitySetDispatchQueue() failed: %s", self, SCErrorString(SCError()));
return;
}
}
@@ -346,8 +346,8 @@ static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReach
- (void)unscheduleObserver {
if (_reachabilityRef) {
RKLogDebug(@"%@: Unscheduling reachability observer from main dispatch queue", self);
if (! SCNetworkReachabilityUnscheduleFromRunLoop(_reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)) {
RKLogWarning("%@: SCNetworkReachabilityUnscheduleFromRunLoop() failed: %s\n", self, SCErrorString(SCError()));
if (! SCNetworkReachabilitySetDispatchQueue(_reachabilityRef, NULL)) {
RKLogWarning("%@: SCNetworkReachabilitySetDispatchQueue() failed: %s\n", self, SCErrorString(SCError()));
return;
}
} else {