diff --git a/Sources/WireGuardKit/WireGuardAdapter.swift b/Sources/WireGuardKit/WireGuardAdapter.swift index 6c2e956..16e1b28 100644 --- a/Sources/WireGuardKit/WireGuardAdapter.swift +++ b/Sources/WireGuardKit/WireGuardAdapter.swift @@ -21,9 +21,6 @@ public enum WireGuardAdapterError: Error { /// Failure to set network settings. case setNetworkSettings(Error) - /// Timeout when calling to set network settings. - case setNetworkSettingsTimeout - /// Failure to start WireGuard backend. case startWireGuardBackend(Int32) } @@ -304,7 +301,7 @@ public class WireGuardAdapter { throw WireGuardAdapterError.setNetworkSettings(systemError) } } else { - throw WireGuardAdapterError.setNetworkSettingsTimeout + self.logHandler(.error, "setTunnelNetworkSettings timed out after 5 seconds; proceeding anyway") } } diff --git a/Sources/WireGuardNetworkExtension/PacketTunnelProvider.swift b/Sources/WireGuardNetworkExtension/PacketTunnelProvider.swift index 042d86c..5ba8222 100644 --- a/Sources/WireGuardNetworkExtension/PacketTunnelProvider.swift +++ b/Sources/WireGuardNetworkExtension/PacketTunnelProvider.swift @@ -57,11 +57,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider { errorNotifier.notify(PacketTunnelProviderError.couldNotSetNetworkSettings) completionHandler(PacketTunnelProviderError.couldNotSetNetworkSettings) - case .setNetworkSettingsTimeout: - wg_log(.error, message: "Starting tunnel failed with setTunnelNetworkSettings timing out") - errorNotifier.notify(PacketTunnelProviderError.couldNotSetNetworkSettings) - completionHandler(PacketTunnelProviderError.couldNotSetNetworkSettings) - case .startWireGuardBackend(let errorCode): wg_log(.error, message: "Starting tunnel failed with wgTurnOn returning \(errorCode)") errorNotifier.notify(PacketTunnelProviderError.couldNotStartBackend)