aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
diff options
context:
space:
mode:
authorEric Kuck <eric@bluelinelabs.com>2018-12-21 22:41:54 -0600
committerEric Kuck <eric@bluelinelabs.com>2018-12-21 22:57:17 -0600
commit0bec5b04b0b76fef7eeafc6609ffa05c61117df8 (patch)
tree25792a2b8448d529867fd4a8f9370dddf258177a /WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
parentClean up trailing whitespace (diff)
downloadwireguard-apple-0bec5b04b0b76fef7eeafc6609ffa05c61117df8.tar.xz
wireguard-apple-0bec5b04b0b76fef7eeafc6609ffa05c61117df8.zip
All models now Equatable
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift4
1 files changed, 4 insertions, 0 deletions
diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
index e44d2985..ca8902f2 100644
--- a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
+++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
@@ -13,6 +13,10 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
private var lastFirstInterface: NWInterface?
private var packetTunnelSettingsGenerator: PacketTunnelSettingsGenerator?
+ deinit {
+ networkMonitor?.cancel()
+ }
+
override func startTunnel(options: [String: NSObject]?, completionHandler startTunnelCompletionHandler: @escaping (Error?) -> Void) {
let activationAttemptId = options?["activationAttemptId"] as? String
let errorNotifier = ErrorNotifier(activationAttemptId: activationAttemptId)