diff --git a/Sources/NetworkProtection/PacketTunnelProvider.swift b/Sources/NetworkProtection/PacketTunnelProvider.swift index 5f6e068fd..a97e80fbc 100644 --- a/Sources/NetworkProtection/PacketTunnelProvider.swift +++ b/Sources/NetworkProtection/PacketTunnelProvider.swift @@ -603,7 +603,7 @@ open class PacketTunnelProvider: NEPacketTunnelProvider { // expired. In either case it should be enough to record the manual failures // for these prerequisited to avoid flooding our metrics. providerEvents.fire(.tunnelStartOnDemandWithoutAccessToken) - try? await Task.sleep(interval: .seconds(15)) + try await Task.sleep(interval: .seconds(15)) } else { // If the VPN was started manually without the basic prerequisites we always // want to know as this should not be possible. @@ -631,7 +631,7 @@ open class PacketTunnelProvider: NEPacketTunnelProvider { // We add a delay when the VPN is started by // on-demand and there's an error, to avoid frenetic ON/OFF // cycling. - try? await Task.sleep(interval: .seconds(15)) + try await Task.sleep(interval: .seconds(15)) } let errorDescription = (error as? LocalizedError)?.localizedDescription ?? String(describing: error) @@ -1297,13 +1297,6 @@ open class PacketTunnelProvider: NEPacketTunnelProvider { connectionStatus = .connected(connectedDate: Date()) } - if !settings.disableRekeying { - guard !isKeyExpired else { - try await rekey() - return - } - } - os_log("🔵 Tunnel interface is %{public}@", log: .networkProtection, type: .info, adapter.interfaceName ?? "unknown") // These cases only make sense in the context of a connection that had trouble