From 8bbf4e084a97eb90ffae52d9ec2fe50f7190f06a Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Sat, 6 Apr 2019 00:26:06 +0530 Subject: [PATCH] TunnelsManager: When setting a config, also set isAvailable cache --- WireGuard/WireGuard/Tunnel/TunnelsManager.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift index b1def4c..b0bf0cb 100644 --- a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift +++ b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift @@ -607,6 +607,7 @@ extension NETunnelProviderManager { protocolConfiguration = NETunnelProviderProtocol(tunnelConfiguration: tunnelConfiguration, previouslyFrom: protocolConfiguration) localizedDescription = tunnelConfiguration.name objc_setAssociatedObject(self, &NETunnelProviderManager.cachedConfigKey, tunnelConfiguration, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) + objc_setAssociatedObject(self, &NETunnelProviderManager.cachedIsConfigAvailableInKeychainKey, NSNumber(value: true), objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) } func isEquivalentTo(_ tunnel: TunnelContainer) -> Bool {