NE: No need for two startTunnel() methods
This commit is contained in:
parent
fe69fe57e4
commit
82ca9f7c5a
|
@ -23,6 +23,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
||||||
networkMonitor?.cancel()
|
networkMonitor?.cancel()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//swiftlint:disable:next function_body_length
|
||||||
override func startTunnel(options: [String: NSObject]?, completionHandler startTunnelCompletionHandler: @escaping (Error?) -> Void) {
|
override func startTunnel(options: [String: NSObject]?, completionHandler startTunnelCompletionHandler: @escaping (Error?) -> Void) {
|
||||||
|
|
||||||
let activationAttemptId = options?["activationAttemptId"] as? String
|
let activationAttemptId = options?["activationAttemptId"] as? String
|
||||||
|
@ -35,11 +36,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
||||||
return
|
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()
|
configureLogger()
|
||||||
|
|
||||||
wg_log(.info, message: "Starting tunnel '\(tunnelConfiguration.interface.name)'")
|
wg_log(.info, message: "Starting tunnel '\(tunnelConfiguration.interface.name)'")
|
||||||
|
|
Loading…
Reference in New Issue