TunnelsManager: Wait for 6 seconds on deactivation instead of 5

This commit is contained in:
Jason A. Donenfeld 2019-02-05 16:56:17 +01:00
parent 4ac1437c4b
commit d2556d045d
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