Skip to content

Commit

Permalink
Update pkg/util/timetool/distributedtimer.go
Browse files Browse the repository at this point in the history
Co-authored-by: Yun Long <[email protected]>
  • Loading branch information
localvar and xxx7xxxx authored Aug 31, 2021
1 parent 8d0facd commit a813d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/util/timetool/distributedtimer.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (dt *DistributedTimer) run() {
case <-dt.done:
return
case now := <-time.After(dt.nextDurationFunc()):
// use a select to avoid block
// NOTE: Use a select-statement to avoid block and always send last time.
select {
case dt.C <- now:
default:
Expand Down

0 comments on commit a813d70

Please sign in to comment.