fix(heartbeats): dont consider a heartbeat if verification failed

This commit is contained in:
Guy Lewin 2020-02-19 16:32:04 +02:00
parent 72626ac2b8
commit 99c13cdb0c

View File

@ -462,6 +462,7 @@ func (ctl *Control) manager() {
case *msg.Ping: case *msg.Ping:
if err := ctl.authVerifier.VerifyPing(m); err != nil { if err := ctl.authVerifier.VerifyPing(m); err != nil {
xl.Warn("received invalid ping: %v", err) xl.Warn("received invalid ping: %v", err)
return
} }
ctl.lastPing = time.Now() ctl.lastPing = time.Now()
xl.Debug("receive heartbeat") xl.Debug("receive heartbeat")