From 71d26b4122a60cde28daad1bca179e0a5de26873 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 5 Feb 2019 16:56:17 +0100 Subject: TunnelsManager: Wait for 6 seconds on deactivation instead of 5 Signed-off-by: Jason A. Donenfeld --- WireGuard/WireGuard/Tunnel/TunnelsManager.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'WireGuard') diff --git a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift index 70b69f9..93f75ff 100644 --- a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift +++ b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift @@ -438,7 +438,7 @@ class TunnelContainer: NSObject { // If a tunnel gets activated in this time interval, it's stopped by the system automatically in ~25 seconds. if self.status == .deactivating && tunnelProvider.connection.status == .disconnected { self.deactivationTimer?.invalidate() - let deactivationTimer = Timer(timeInterval: 5 /* seconds */, repeats: false) { [weak self] _ in + let deactivationTimer = Timer(timeInterval: 6 /* seconds */, repeats: false) { [weak self] _ in guard let self = self else { return } self.status = TunnelStatus(from: self.tunnelProvider.connection.status) self.isActivateOnDemandEnabled = self.tunnelProvider.isOnDemandEnabled -- cgit v1.2.3-59-g8ed1b