Post

Replies

Boosts

Views

Activity

Reply to Stop tunnel method gets interrupted on 'providerDisabled'
@eskimo, Here is a pseudo code scenario, with logging when the extension gets called stopTunnel with a reason being .providerDisabled. I have a OSLog instance to check how far it will execute the method. It will only print "stopTunnel because" and the "starting clean-up") and then gets exited due to uninstall I guess. override func stopTunnel(with reason: NEProviderStopReason) async { logger.log("Stop tunnel because: \(reason, privacy: .public)") if case .providerDisabled = reason { logger.log("Starting clean-up") let result = await doPseudoCodeCleanup() switch result { case .success: logger.log("clean up done") case .failure(let error): logger.log("Clean up failed due to error: \(error.localizedDescription, privacy: .public)") } logger.log("providerDisabled cleanup, done.") } logger.log("Stop tunnel end") }
Sep ’22