Removing a tunnel from iOS's settings is now immediately reflected in app

Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
This commit is contained in:
Eric Kuck
2018-12-21 21:59:43 -06:00
parent 8365adf435
commit 9098cd1161
6 changed files with 72 additions and 52 deletions
@@ -13,10 +13,6 @@ 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)