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; ...@@ -113,10 +113,9 @@ std::unique_ptr<lrc::api::Lrc> lrc;
SCNetworkReachabilityRef reachabilityRef = NULL; SCNetworkReachabilityRef reachabilityRef = NULL;
void (^callbackBlock)(SCNetworkReachabilityFlags) = ^(SCNetworkReachabilityFlags flags) { void (^callbackBlock)(SCNetworkReachabilityFlags) = ^(SCNetworkReachabilityFlags flags) {
BOOL reachable = (flags & kSCNetworkReachabilityFlagsReachable) != 0; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[[NSOperationQueue mainQueue] addOperationWithBlock:^{
lrc->connectivityChanged(); lrc->connectivityChanged();
}]; });
}; };
SCNetworkReachabilityContext context = { 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