We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 020d98e commit e523e57Copy full SHA for e523e57
1 file changed
intra/ipn/wgproxy.go
@@ -336,11 +336,11 @@ func (w *wgproxy) Refresh() (err error) {
336
337
if err = w.resetMtu(via); err == nil {
338
err = w.Device.Down()
339
+ resetDevice = resetDevice && w.wgtun.ignoreTUNClose.CompareAndSwap(false, true)
340
if resetDevice && err == nil {
341
var newdev *device.Device
342
const useExistingCfg = ""
343
if newdev, err = newdevice(w.wgtun, w.wgep, useExistingCfg); err == nil {
- w.wgtun.ignoreTUNClose.CompareAndSwap(false, true)
344
w.Device.Close() // will end up calling wgtun.Close() which hopefully is ignored
345
w.Device = newdev
346
} // newdevice calls w.Device.Up() internally
0 commit comments