People are actually hitting this condition, so make it uniform. Also,
change a printf into a println, to match the other conventions.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
switch newIsUp {
case true:
if err := device.BindUpdate(); err != nil {
- device.log.Error.Printf("Unable to update bind: %v\n", err)
+ device.log.Error.Println("Unable to update bind:", err)
device.isUp.Set(false)
break
}
err = peer.SendBuffer(packet)
if err != nil {
- peer.device.log.Error.Println(peer, "- Failed to send handshake initiation", err)
+ peer.device.log.Error.Println(peer, "- Failed to send handshake initiation:", err)
}
peer.timersHandshakeInitiated()
err = peer.SendBuffer(packet)
if err != nil {
- peer.device.log.Error.Println(peer, "- Failed to send handshake response", err)
+ peer.device.log.Error.Println(peer, "- Failed to send handshake response:", err)
}
return err
}