aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/Tunnel
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-12-22 05:30:35 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-12-22 05:30:35 +0100
commitd36e7e27ffab1c0d22967185d64442226689906e (patch)
tree8f34a525b6baea40c9fe35f2606bda938e4839ea /WireGuard/WireGuard/Tunnel
parentDo not crash if we can't get socket.fileDescriptor (diff)
downloadwireguard-apple-d36e7e27ffab1c0d22967185d64442226689906e.tar.xz
wireguard-apple-d36e7e27ffab1c0d22967185d64442226689906e.zip
Clean up trailing whitespace
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'WireGuard/WireGuard/Tunnel')
-rw-r--r--WireGuard/WireGuard/Tunnel/TunnelsManager.swift6
1 files changed, 3 insertions, 3 deletions
diff --git a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
index 8d8cec93..86f57d94 100644
--- a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
+++ b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
@@ -52,7 +52,7 @@ class TunnelsManager {
}
#endif
}
-
+
func reload(completionHandler: @escaping (Bool) -> Void) {
#if targetEnvironment(simulator)
completionHandler(.success(false))
@@ -62,7 +62,7 @@ class TunnelsManager {
completionHandler(false)
return
}
-
+
let newTunnels = managers.map { TunnelContainer(tunnel: $0) }.sorted { $0.name < $1.name }
let hasChanges = self.tunnels.map { $0.name } != newTunnels.map { $0.name }
if hasChanges {
@@ -317,7 +317,7 @@ private func lastErrorTextFromNetworkExtension(for tunnel: TunnelContainer) -> (
guard let lastErrorData = try? Data(contentsOf: lastErrorFileURL) else { return nil }
guard let lastErrorStrings = String(data: lastErrorData, encoding: .utf8)?.splitToArray(separator: "\n") else { return nil }
guard lastErrorStrings.count == 2 && tunnel.activationAttemptId == lastErrorStrings[0] else { return nil }
-
+
switch PacketTunnelProviderError(rawValue: lastErrorStrings[1]) {
case .some(.savedProtocolConfigurationIsInvalid):
return (tr("alertTunnelActivationFailureTitle"), tr("alertTunnelActivationSavedConfigFailureMessage"))