From f5232099c2702a5724a988f7916c855d3976e1f4 Mon Sep 17 00:00:00 2001 From: liweining Date: Thu, 22 Feb 2024 20:14:30 +0800 Subject: [PATCH] fix: Timer reset --- timer/timer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timer/timer.go b/timer/timer.go index 81455618..2f0e68be 100644 --- a/timer/timer.go +++ b/timer/timer.go @@ -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] }