diff --git a/common/signal/timer.go b/common/signal/timer.go index 0eb92d2ab..dfcbd849a 100644 --- a/common/signal/timer.go +++ b/common/signal/timer.go @@ -23,20 +23,17 @@ func (t *ActivityTimer) run() { for { select { case <-time.After(t.timeout): - t.cancel() - return case <-t.ctx.Done(): return - default: - select { - case <-time.After(t.timeout): - t.cancel() - return - case <-t.ctx.Done(): - return - case <-t.updated: - } } + select { + case <-t.updated: + // Updated keep waiting. + default: + t.cancel() + return + } + } }