refactor: more logs on countdown

This commit is contained in:
Wang Gerui 2025-02-15 17:44:39 +08:00
parent 47543e8b1c
commit 37b1929621

View file

@ -85,13 +85,14 @@ func (t *CountdownTimer) startTimer(i interface{}, currentRound, highestRound ty
}()
timer.Reset(t.durationHelper.GetTimeoutDuration(currentRound, highestRound))
case info := <-t.resetc:
log.Debug("Reset countdown timer")
currentRound = info.currentRound
highestRound = info.highestRound
duration := t.durationHelper.GetTimeoutDuration(currentRound, highestRound)
log.Debug("Reset countdown timer", "duration", duration, "currentRound", currentRound, "highestRound", highestRound)
if !timer.Stop() {
<-timer.C
}
timer.Reset(t.durationHelper.GetTimeoutDuration(currentRound, highestRound))
timer.Reset(duration)
}
}
}