You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After waits for the duration to elapse and then sends the current time on the returned channel. It is equivalent to NewTimer(d).C. The underlying Timer is not recovered by the garbage collector until the timer fires. If efficiency is a concern, use NewTimer instead and call Timer.Stop if the timer is no longer needed.
Usage of
<-time.After(c.Timeout)
here may lead to memory leak.According to the official time package docs:
Possible solution:
With
time.After
(200K healthcheck requests):With
time.NewTimer
(200K healthcheck requests):References:
The text was updated successfully, but these errors were encountered: