Skip to content

Commit

Permalink
Merge pull request #398 from liwnn/master
Browse files Browse the repository at this point in the history
fix: Timer reset
  • Loading branch information
lesismal authored Feb 22, 2024
2 parents f6d12be + f523209 commit a22b783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion timer/timer.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (t *Timer) Async(f func()) {
t.asyncMux.Lock()
if i == len(t.asyncList) {
if cap(t.asyncList) > 1024 {
t.asyncList = make([]func(), 8)
t.asyncList = make([]func(), 0, 8)
} else {
t.asyncList = t.asyncList[0:0]
}
Expand Down

0 comments on commit a22b783

Please sign in to comment.