From be6af14261a200ac3911ebdef1edf2cae2e35f3d Mon Sep 17 00:00:00 2001 From: kercylan98 Date: Tue, 23 Apr 2024 10:46:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20timer.Pool=20?= =?UTF-8?q?=E5=9C=A8=E8=8E=B7=E5=8F=96=E5=88=B0=E6=B1=A0=E4=B8=AD=20Ticker?= =?UTF-8?q?=20=E6=97=B6=EF=BC=8C=E5=8F=AF=E9=80=89=E9=A1=B9=E4=B8=8D?= =?UTF-8?q?=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/timer/pool.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/timer/pool.go b/utils/timer/pool.go index dc987ac..b6979b7 100644 --- a/utils/timer/pool.go +++ b/utils/timer/pool.go @@ -46,6 +46,9 @@ func (slf *Pool) GetTicker(size int, options ...Option) *Ticker { if len(slf.tickers) > 0 { ticker = slf.tickers[0] slf.tickers = slf.tickers[1:] + for _, option := range options { + option(ticker) + } return ticker }