summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2021-05-05 11:20:03 +0200
committerAndrej Mihajlov <and@mullvad.net>2021-05-05 12:12:04 +0200
commit89db181d37fc9284619cef7e9333cbd7b6a1b6f1 (patch)
tree3b1ab30bcda7c33407d847a5772a7985700e0466
parentb1bbae1c858990087995b59af29af63cb1536fd0 (diff)
downloadmullvadvpn-89db181d37fc9284619cef7e9333cbd7b6a1b6f1.tar.xz
mullvadvpn-89db181d37fc9284619cef7e9333cbd7b6a1b6f1.zip
TunnelManager: properly finish operation in stopTunnel()
The operation was not being finished in the event of failure to save tunnel configuration to system preferences.
-rw-r--r--ios/CHANGELOG.md4
-rw-r--r--ios/MullvadVPN/TunnelManager.swift2
2 files changed, 5 insertions, 1 deletions
diff --git a/ios/CHANGELOG.md b/ios/CHANGELOG.md
index 8535a7f7a9..dd504ed5fe 100644
--- a/ios/CHANGELOG.md
+++ b/ios/CHANGELOG.md
@@ -26,6 +26,10 @@ Line wrap the file at 100 chars. Th
### Added
- Enable option to "Select all" when viewing app logs.
+### Fixed
+- Fix bug which caused the tunnel manager to become unresponsive in the rare event of failure to
+ disable on-demand when stopping the tunnel from within the app.
+
## [2021.1] - 2021-03-16
### Added
diff --git a/ios/MullvadVPN/TunnelManager.swift b/ios/MullvadVPN/TunnelManager.swift
index 9909ef6295..9f0e478daf 100644
--- a/ios/MullvadVPN/TunnelManager.swift
+++ b/ios/MullvadVPN/TunnelManager.swift
@@ -422,7 +422,7 @@ class TunnelManager {
tunnelProvider.saveToPreferences { (error) in
if let error = error {
- completionHandler(.failure(.saveVPNConfiguration(error)))
+ finish(.failure(.saveVPNConfiguration(error)))
} else {
tunnelProvider.connection.stopVPNTunnel()
finish(.success(()))