summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-02-09 15:25:43 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-02-09 15:37:04 +0100
commitd6e76fdbd6bae64a08662eb19d3634adb4881155 (patch)
tree02e6f51a04e0090a29c0509c069696a88750a9b6
parentdevice: do not attach finalizer to non-returned object (diff)
downloadwireguard-go-d6e76fdbd6bae64a08662eb19d3634adb4881155.tar.xz
wireguard-go-d6e76fdbd6bae64a08662eb19d3634adb4881155.zip
device: do not log on idempotent device state change
Part of being actually idempotent is that we shouldn't penalize code that takes advantage of this property with a log splat. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--device/device.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/device/device.go b/device/device.go
index b93ad22..895c9db 100644
--- a/device/device.go
+++ b/device/device.go
@@ -160,7 +160,6 @@ func (device *Device) changeState(want deviceState) {
}
switch want {
case old:
- device.log.Verbosef("Interface already in state %s", want)
return
case deviceStateUp:
atomic.StoreUint32(&device.state.state, uint32(deviceStateUp))