]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
device: do not log on idempotent device state change
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 9 Feb 2021 14:25:43 +0000 (15:25 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 9 Feb 2021 14:37:04 +0000 (15:37 +0100)
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>
device/device.go

index b93ad22cb66040173126095ea5c476e099182d58..895c9db4ef335149f04d4e0dba18c9f48e2547bc 100644 (file)
@@ -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))