aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-12-19 13:10:42 +0530
committerRoopesh Chander <roop@roopc.net>2018-12-19 13:10:42 +0530
commit04a8c2ff5adaffdec04effb30cc75d166f908c85 (patch)
treeafde5285ea78024c0238cea2f8a49c4e3c393eac /WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
parentTunnelsManager: Handle waiting on a stale tunnel (diff)
downloadwireguard-apple-04a8c2ff5adaffdec04effb30cc75d166f908c85.tar.xz
wireguard-apple-04a8c2ff5adaffdec04effb30cc75d166f908c85.zip
NE: No need for two startTunnel() methods
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift6
1 files changed, 1 insertions, 5 deletions
diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
index 8fd5cad..12a2e43 100644
--- a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
+++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
@@ -23,6 +23,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
networkMonitor?.cancel()
}
+ //swiftlint:disable:next function_body_length
override func startTunnel(options: [String: NSObject]?, completionHandler startTunnelCompletionHandler: @escaping (Error?) -> Void) {
let activationAttemptId = options?["activationAttemptId"] as? String
@@ -35,11 +36,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
return
}
- startTunnel(with: tunnelConfiguration, errorNotifier: errorNotifier, completionHandler: startTunnelCompletionHandler)
- }
-
- //swiftlint:disable:next function_body_length
- func startTunnel(with tunnelConfiguration: TunnelConfiguration, errorNotifier: ErrorNotifier, completionHandler startTunnelCompletionHandler: @escaping (Error?) -> Void) {
configureLogger()
wg_log(.info, message: "Starting tunnel '\(tunnelConfiguration.interface.name)'")