mirror of
https://github.com/passepartoutvpn/wireguard-apple.git
synced 2025-01-18 22:39:08 +00:00
Retain aggressive socket reestablishment for now
This can be reverted once we've done more testing. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
d29f47fc9b
commit
dddbf3b370
@ -113,7 +113,8 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
|
|||||||
private func pathUpdate(path: Network.NWPath) {
|
private func pathUpdate(path: Network.NWPath) {
|
||||||
guard let handle = wgHandle, let packetTunnelSettingsGenerator = packetTunnelSettingsGenerator else { return }
|
guard let handle = wgHandle, let packetTunnelSettingsGenerator = packetTunnelSettingsGenerator else { return }
|
||||||
var listenPort: UInt16?
|
var listenPort: UInt16?
|
||||||
if path.availableInterfaces.isEmpty || lastFirstInterface != path.availableInterfaces.first {
|
//TODO(zx2c4): Remove the `true` here after extensive testing with network/cell simulations.
|
||||||
|
if true || path.availableInterfaces.isEmpty || lastFirstInterface != path.availableInterfaces.first {
|
||||||
listenPort = wgGetListenPort(handle)
|
listenPort = wgGetListenPort(handle)
|
||||||
lastFirstInterface = path.availableInterfaces.first
|
lastFirstInterface = path.availableInterfaces.first
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user