Retain aggressive socket reestablishment for now

This can be reverted once we've done more testing.
This commit is contained in:
Jason A. Donenfeld 2018-12-22 15:45:09 +01:00
parent 2e37d511db
commit a60b2a37d0
1 changed files with 2 additions and 1 deletions

View File

@ -113,7 +113,8 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
private func pathUpdate(path: Network.NWPath) {
guard let handle = wgHandle, let packetTunnelSettingsGenerator = packetTunnelSettingsGenerator else { return }
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)
lastFirstInterface = path.availableInterfaces.first
}