Use time.after instead of time.tick to not leak (#3751)

This commit is contained in:
Tomas Touceda 2022-01-18 16:50:15 -03:00 committed by GitHub
parent dd751cccf6
commit f85941e60c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,7 +108,7 @@ func (s *Service) updateJitterSeedRand() {
func (s *Service) updateJitterSeed(ctx context.Context) {
for {
select {
case <-time.Tick(1 * time.Hour):
case <-time.After(1 * time.Hour):
s.updateJitterSeedRand()
case <-ctx.Done():
return