Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Is there a way to prevent "infinity" reconnection when the OpenVPN server is shut down? #419

Open
jarakys opened this issue Apr 15, 2024 · 0 comments

Comments

@jarakys
Copy link

jarakys commented Apr 15, 2024

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant