mirror of
https://github.com/minio/minio.git
synced 2026-11-13 14:44:19 +00:00
fix: timer usage across codebase (#14935)
it seems in some places we have been wrongly using the timer.Reset() function, nicely exposed by an example shared by @donatello https://go.dev/play/p/qoF71_D1oXD this PR fixes all the usage comprehensively
This commit is contained in:
1 parent
2dc8ac1e62
commit
6cfb1cb6fd
12 files changed
+36
-40
No files matched your search
@@ -3330,10 +3330,10 @@ func (c *SiteReplicationSys) startHealRoutine(ctx context.Context, objAPI Object
|
||||
defer healTimer.Stop()
|
||||
|
||||
for {
|
||||
healTimer.Reset(siteHealTimeInterval)
|
||||
|
||||
select {
|
||||
case <-healTimer.C:
|
||||
healTimer.Reset(siteHealTimeInterval)
|
||||
|
||||
c.RLock()
|
||||
enabled := c.enabled
|
||||
c.RUnlock()
|
||||
|
||||
Reference in new issue
Block a user