lib/timerpool: remove check of Reset output value

This commit is contained in:
Andrii Chubatiuk
2025-10-02 08:42:58 +03:00
parent 676a88793a
commit 7ea70b8f57

View File

@@ -3,8 +3,6 @@ package timerpool
import (
"sync"
"time"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
)
// Get returns a timer for the given duration d from the pool.
@@ -13,9 +11,7 @@ import (
func Get(d time.Duration) *time.Timer {
if v := timerPool.Get(); v != nil {
t := v.(*time.Timer)
if t.Reset(d) {
logger.Panicf("BUG: active timer trapped to the pool!")
}
t.Reset(d)
return t
}
return time.NewTimer(d)