From 04a8c2ff5adaffdec04effb30cc75d166f908c85 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Wed, 19 Dec 2018 13:10:42 +0530 Subject: NE: No need for two startTunnel() methods Signed-off-by: Roopesh Chander --- WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift') 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)'") -- cgit v1.2.3-59-g8ed1b