1
0
mirror of https://git.zx2c4.com/wireguard-go synced 2024-11-15 01:05:15 +01:00

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>
This commit is contained in:
Jason A. Donenfeld 2021-02-09 15:25:43 +01:00
parent 6ac1240821
commit d6e76fdbd6

View File

@ -160,7 +160,6 @@ func (device *Device) changeState(want deviceState) {
} }
switch want { switch want {
case old: case old:
device.log.Verbosef("Interface already in state %s", want)
return return
case deviceStateUp: case deviceStateUp:
atomic.StoreUint32(&device.state.state, uint32(deviceStateUp)) atomic.StoreUint32(&device.state.state, uint32(deviceStateUp))