Skip to content

Commit d1ff418

Browse files
KM-17006: remove broken conditional compilation
The protocols are not available on tvOS, but it really doesnt matter if we keep them on the switch.
1 parent c4490d5 commit d1ff418

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

LocalPackages/PIALibrary/Sources/PIALibrary/Daemons/ConnectivityDaemon.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ final class ConnectivityDaemon: Daemon, ConfigurationAccess, DatabaseAccess, Pre
9191
networkObserver.whenUnreachable = { [weak self] in
9292
guard let self else { return }
9393
DispatchQueue.main.async {
94+
guard self.accessedDatabase.transient.vpnStatus != .connecting else {
95+
// while connecting we are unreachable, but expected, skip reporting
96+
return
97+
}
9498
guard self.accessedDatabase.transient.isNetworkReachable else {
9599
return
96100
}

LocalPackages/PIALibrary/Sources/PIALibrary/ServiceQuality/ServiceQualityManager.swift

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -244,17 +244,14 @@ public final class ServiceQualityManager: NSObject {
244244
}
245245

246246
private func currentProtocol() -> KPIVpnProtocol {
247-
248247
switch Client.providers.vpnProvider.currentVPNType {
249-
case IKEv2Profile.vpnType:
250-
return KPIVpnProtocol.ipsec
251-
#if (iOS)
252-
case PIATunnelProfile.vpnType:
253-
return KPIVpnProtocol.ovpn
254-
case PIAWGTunnelProfile.vpnType:
255-
return KPIVpnProtocol.wireguard
248+
case IKEv2Profile.vpnType: return .ipsec
249+
#if !os(tvOS)
250+
case PIATunnelProfile.vpnType: return .ovpn
251+
case PIAWGTunnelProfile.vpnType: return .wireguard
256252
#endif
257-
default:
253+
case let other:
254+
log.warning("Unknown VPN type: \(other)")
258255
return KPIVpnProtocol.ipsec
259256
}
260257
}

0 commit comments

Comments
 (0)