Hello everyone,
Is there a way to prevent "infinity" reconnection when the OpenVPN server is shut down? I have the following rules:
let onDemandRule = NEOnDemandRuleConnect()
onDemandRule.interfaceTypeMatch = .wiFi
let onDemandRule1 = NEOnDemandRuleConnect()
onDemandRule1.interfaceTypeMatch = .cellular
var extra = NetworkExtensionExtra()
extra.disconnectsOnSleep = false
extra.passwordReference = passwordReference
extra.onDemandRules = [onDemandRule, onDemandRule1]
When the server is shut down, the app keeps trying to reconnect endlessly. Is there a way to avoid this? I cannot "ping" the server because when the OpenVPN server is shut down, I don't have an internet connection as the app keeps trying to reconnect.