This will cause more socket flaps than necessary but hopefully will fix
some bugs.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
private var handle: Int32?
private var networkMonitor: NWPathMonitor?
private var ifname: String?
- private var lastPath: Network.NWPath?
private var packetTunnelSettingsGenerator: PacketTunnelSettingsGenerator?
deinit {
_ = packetTunnelSettingsGenerator.endpointUapiConfiguration().withGoString { return wgSetConfig(handle, $0) }
}
#endif
- if path != lastPath {
- lastPath = path
- wgBumpSockets(handle)
- }
+ wgBumpSockets(handle)
}
}