From 3f3f22a0483e0e1c9b04f3fc3f756f70d91b8e41 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Thu, 8 Nov 2018 15:08:57 +0530 Subject: [PATCH] Move logic to extension: .resolvingEndpointDomains is not longer a valid status --- WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift | 2 -- .../WireGuard/UI/iOS/TunnelDetailTableViewController.swift | 2 -- WireGuard/WireGuard/VPN/TunnelsManager.swift | 5 ----- 3 files changed, 9 deletions(-) diff --git a/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift b/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift index d9a66dd..cbb5b8b 100644 --- a/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift +++ b/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift @@ -33,8 +33,6 @@ class ErrorPresenter { case .restarting: return "active" case .activating: fallthrough - case .resolvingEndpointDomains: - return "being activated" case .deactivating: return "being deactivated" case .inactive: diff --git a/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift index 3e30662..76a38e3 100644 --- a/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift @@ -259,8 +259,6 @@ class TunnelDetailTableViewStatusCell: UITableViewCell { text = "Deactivating" case .reasserting: text = "Reactivating" - case .resolvingEndpointDomains: - text = "Resolving domains" case .restarting: text = "Restarting" } diff --git a/WireGuard/WireGuard/VPN/TunnelsManager.swift b/WireGuard/WireGuard/VPN/TunnelsManager.swift index c413e1d..be6c860 100644 --- a/WireGuard/WireGuard/VPN/TunnelsManager.swift +++ b/WireGuard/WireGuard/VPN/TunnelsManager.swift @@ -372,10 +372,6 @@ class TunnelContainer: NSObject { } return } - if (s.status == .resolvingEndpointDomains && connection.status == .disconnected) { - // Don't change to .inactive if we're still resolving endpoints - return - } s.status = TunnelStatus(from: connection.status) if (s.status == .inactive) { s.statusObservationToken = nil @@ -392,7 +388,6 @@ class TunnelContainer: NSObject { case reasserting // Not a possible state at present case restarting // Restarting tunnel (done after saving modifications to an active tunnel) - case resolvingEndpointDomains // DNS resolution in progress init(from vpnStatus: NEVPNStatus) { switch (vpnStatus) {