diff options
Diffstat (limited to 'tunnel/winipcfg/interface_change_handler.go')
-rw-r--r-- | tunnel/winipcfg/interface_change_handler.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tunnel/winipcfg/interface_change_handler.go b/tunnel/winipcfg/interface_change_handler.go index 50ea6448..57041719 100644 --- a/tunnel/winipcfg/interface_change_handler.go +++ b/tunnel/winipcfg/interface_change_handler.go @@ -64,9 +64,10 @@ func (callback *InterfaceChangeCallback) Unregister() error { } func interfaceChanged(callerContext uintptr, row *MibIPInterfaceRow, notificationType MibNotificationType) uintptr { + rowCopy := *row interfaceChangeMutex.Lock() for cb := range interfaceChangeCallbacks { - go cb.cb(notificationType, row) + go cb.cb(notificationType, &rowCopy) } interfaceChangeMutex.Unlock() return 0 |