diff --git a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift index 3120f7d..70b69f9 100644 --- a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift +++ b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift @@ -388,7 +388,7 @@ class TunnelContainer: NSObject { self.refreshStatus() } self.activationTimer = activationTimer - RunLoop.main.add(activationTimer, forMode: .default) + RunLoop.main.add(activationTimer, forMode: .common) } } } @@ -444,7 +444,7 @@ class TunnelContainer: NSObject { self.isActivateOnDemandEnabled = self.tunnelProvider.isOnDemandEnabled } self.deactivationTimer = deactivationTimer - RunLoop.main.add(deactivationTimer, forMode: .default) + RunLoop.main.add(deactivationTimer, forMode: .common) return } #endif diff --git a/WireGuard/WireGuard/UI/macOS/StatusItemController.swift b/WireGuard/WireGuard/UI/macOS/StatusItemController.swift index 2568c15..e401925 100644 --- a/WireGuard/WireGuard/UI/macOS/StatusItemController.swift +++ b/WireGuard/WireGuard/UI/macOS/StatusItemController.swift @@ -53,7 +53,7 @@ class StatusItemController { self.statusItem.button?.image = self.animationImages[self.animationImageIndex] self.animationImageIndex = (self.animationImageIndex + 1) % self.animationImages.count } - RunLoop.main.add(timer, forMode: .default) + RunLoop.main.add(timer, forMode: .common) animationTimer = timer } diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift index 489e868..c9cb09a 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift @@ -254,7 +254,7 @@ class TunnelDetailTableViewController: NSViewController { self?.reloadRuntimeConfiguration() } reloadRuntimeConfigurationTimer = reloadTimer - RunLoop.main.add(reloadTimer, forMode: .default) + RunLoop.main.add(reloadTimer, forMode: .common) } func stopUpdatingRuntimeConfiguration() {