Commit 9217e295 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk

connectivity: notify on background thread

Change-Id: Ideb411991cc5f25482057991f85606977214cbd7
parent 26526f20
......@@ -113,10 +113,9 @@ std::unique_ptr<lrc::api::Lrc> lrc;
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 = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment