fix(apple): don't pass completionHandler to IPC if we're not going to call it (#7671)

If we pass a `completionHandler` to `sendProviderMessage`, the Network
Extension framework will expect that completion handler to be called.

Probably doesn't cause any issue as-is, but it would be better to be
correct here.
This commit is contained in:
Jamil
2025-01-05 15:05:48 -08:00
committed by GitHub
parent 088f51b80f
commit 8e221904e9

View File

@@ -293,7 +293,7 @@ public class TunnelManager {
func updateInternetResourceState() {
guard session()?.status == .connected else { return }
try? session()?.sendProviderMessage(encoder.encode(TunnelMessage.internetResourceEnabled(internetResourceEnabled))) { _ in }
try? session()?.sendProviderMessage(encoder.encode(TunnelMessage.internetResourceEnabled(internetResourceEnabled)))
}
func toggleInternetResource(enabled: Bool) {