mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-06 00:00:03 +08:00
Perform start/stop tracking in the main queue
This commit is contained in:
@@ -43,11 +43,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)startTracking {
|
- (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 {
|
- (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 {
|
- (void)dealloc {
|
||||||
|
|||||||
Reference in New Issue
Block a user