From 37b1929621ac3e268f16b4b1b034bacf12886dd6 Mon Sep 17 00:00:00 2001 From: Wang Gerui Date: Sat, 15 Feb 2025 17:44:39 +0800 Subject: [PATCH] refactor: more logs on countdown --- common/countdown/countdown.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/countdown/countdown.go b/common/countdown/countdown.go index b6d7462115..5fc8ec72ad 100644 --- a/common/countdown/countdown.go +++ b/common/countdown/countdown.go @@ -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) } } }