From cf7966e87679911d086dbd9ce05bbe4b6cc52807 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Thu, 1 Nov 2018 01:54:19 +0530 Subject: [PATCH] VPN: We have to start observing the tunnelContainer before we attempt to activate it Signed-off-by: Roopesh Chander --- WireGuard/WireGuard/VPN/TunnelsManager.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WireGuard/WireGuard/VPN/TunnelsManager.swift b/WireGuard/WireGuard/VPN/TunnelsManager.swift index a28963e..70606be 100644 --- a/WireGuard/WireGuard/VPN/TunnelsManager.swift +++ b/WireGuard/WireGuard/VPN/TunnelsManager.swift @@ -234,8 +234,8 @@ class TunnelsManager { completionHandler(TunnelActivationError.attemptingActivationWhenAnotherTunnelIsActive) return } - tunnel.startActivation(completionHandler: completionHandler) setCurrentTunnel(tunnel: tunnel) + tunnel.startActivation(completionHandler: completionHandler) } func startDeactivation(of tunnel: TunnelContainer, completionHandler: @escaping (Error?) -> Void) {