aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2021-07-27 13:35:30 +0530
committerRoopesh Chander <roop@roopc.net>2021-07-28 03:35:05 +0530
commit03ef79c0fdc7742e47244bbd0df9715dd1cc30b4 (patch)
tree23e05d0e454c6cc7cb93150fdb33f85a162e6739
parentUI: When deactivating for activating another tunnel, disable on-demand (diff)
downloadwireguard-apple-03ef79c0fdc7742e47244bbd0df9715dd1cc30b4.tar.xz
wireguard-apple-03ef79c0fdc7742e47244bbd0df9715dd1cc30b4.zip
UI: When reloading tunnels, preserve '.waiting' state
Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r--Sources/WireGuardApp/Tunnel/TunnelsManager.swift2
1 files changed, 1 insertions, 1 deletions
diff --git a/Sources/WireGuardApp/Tunnel/TunnelsManager.swift b/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
index e1a9a39..7bfb339 100644
--- a/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
+++ b/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
@@ -614,7 +614,7 @@ class TunnelContainer: NSObject {
}
func refreshStatus() {
- if status == .restarting {
+ if (status == .restarting) || (status == .waiting && tunnelProvider.connection.status == .disconnected) {
return
}
status = TunnelStatus(from: tunnelProvider.connection.status)