Start/stop tracking asynchronously

This commit is contained in:
Sergey Abramchuk
2017-07-18 21:19:07 +03:00
parent cfa7ec3666
commit e2283bf295

View File

@@ -52,7 +52,7 @@
- (void)startTracking {
dispatch_queue_t main = dispatch_get_main_queue();
dispatch_sync(main, ^{
dispatch_async(main, ^{
self.reachabilityTracker->reachability_tracker_schedule();
});
_isTracking = YES;
@@ -60,7 +60,7 @@
- (void)stopTracking {
dispatch_queue_t main = dispatch_get_main_queue();
dispatch_sync(main, ^{
dispatch_async(main, ^{
self.reachabilityTracker->reachability_tracker_cancel();
});
_isTracking = NO;