refactor: extract and simplify OpenVPN reachability and network change handling logic (#2402)

This commit is contained in:
yyy-amnezia
2026-03-24 16:12:59 +02:00
committed by GitHub
parent fa69da6d56
commit 4103c5bbcf
2 changed files with 95 additions and 15 deletions
@@ -126,13 +126,7 @@ extension PacketTunnelProvider {
}
vpnReachability.startTracking { [weak self] status in
switch status {
case .reachableViaWiFi, .reachableViaWWAN:
ovpnLog(.info, message: "Reachability changed, reconnecting OpenVPN session")
self?.ovpnAdapter?.reconnect(afterTimeInterval: 1)
default:
break
}
self?.handleOpenVPNReachabilityChange(status)
}
startHandler = completionHandler