Make error messages consistent

This commit is contained in:
Jason A. Donenfeld
2018-12-19 00:35:53 +01:00
parent 05cc0c8298
commit a8326ae753
3 changed files with 9 additions and 6 deletions

View File

@@ -351,7 +351,10 @@ func (device *Device) RoutineHandshake() {
// consume reply
if peer := entry.peer; peer.isRunning.Get() {
peer.cookieGenerator.ConsumeReply(&reply)
logDebug.Println("Receiving cookie response from ", elem.endpoint.DstToString())
if !peer.cookieGenerator.ConsumeReply(&reply) {
logDebug.Println("Could not decrypt invalid cookie response")
}
}
continue