TunnelsManager: Wait for 6 seconds on deactivation instead of 5

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2019-02-05 16:56:17 +01:00
parent 71525c9d4e
commit 71d26b4122
1 changed files with 1 additions and 1 deletions

View File

@ -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