connectivity: notify on background thread
Change-Id: Ideb411991cc5f25482057991f85606977214cbd7
diff --git a/src/AppDelegate.mm b/src/AppDelegate.mm
index b1ba91c..714ddd4 100644
--- a/src/AppDelegate.mm
+++ b/src/AppDelegate.mm
@@ -113,10 +113,9 @@
SCNetworkReachabilityRef reachabilityRef = NULL;
void (^callbackBlock)(SCNetworkReachabilityFlags) = ^(SCNetworkReachabilityFlags flags) {
- BOOL reachable = (flags & kSCNetworkReachabilityFlagsReachable) != 0;
- [[NSOperationQueue mainQueue] addOperationWithBlock:^{
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
lrc->connectivityChanged();
- }];
+ });
};
SCNetworkReachabilityContext context = {