Perform start/stop tracking in the main queue

This commit is contained in:
Sergey Abramchuk
2017-07-18 18:06:27 +03:00
parent 3ef3239c08
commit bcfd4ef1d9

View File

@@ -43,11 +43,17 @@
}
- (void)startTracking {
self.reachabilityTracker->reachability_tracker_schedule();
dispatch_queue_t main = dispatch_get_main_queue();
dispatch_sync(main, ^{
self.reachabilityTracker->reachability_tracker_schedule();
});
}
- (void)stopTracking {
self.reachabilityTracker->reachability_tracker_cancel();
dispatch_queue_t main = dispatch_get_main_queue();
dispatch_sync(main, ^{
self.reachabilityTracker->reachability_tracker_cancel();
});
}
- (void)dealloc {