diff options
Diffstat (limited to 'tunnel/winipcfg/unicast_address_change_handler.go')
-rw-r--r-- | tunnel/winipcfg/unicast_address_change_handler.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tunnel/winipcfg/unicast_address_change_handler.go b/tunnel/winipcfg/unicast_address_change_handler.go index b126e2ed..fdd2e058 100644 --- a/tunnel/winipcfg/unicast_address_change_handler.go +++ b/tunnel/winipcfg/unicast_address_change_handler.go @@ -64,9 +64,10 @@ func (callback *UnicastAddressChangeCallback) Unregister() error { } func unicastAddressChanged(callerContext uintptr, row *MibUnicastIPAddressRow, notificationType MibNotificationType) uintptr { + rowCopy := *row unicastAddressChangeMutex.Lock() for cb := range unicastAddressChangeCallbacks { - go cb.cb(notificationType, row) + go cb.cb(notificationType, &rowCopy) } unicastAddressChangeMutex.Unlock() return 0 |