cleanup v3

This commit is contained in:
Tim Vaillancourt 2022-07-07 03:27:36 +02:00
parent 0303031fc2
commit c3593c94ff

View File

@ -448,10 +448,10 @@ func (this *Throttler) initiateThrottlerCollection(firstThrottlingCollected chan
this.collectGeneralThrottleMetrics()
firstThrottlingCollected <- true
throttlerMetricsTick := time.NewTicker(time.Second)
defer throttlerMetricsTick.Stop()
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
for {
<-throttlerMetricsTick.C
<-ticker.C
if atomic.LoadInt64(&this.finishedMigrating) > 0 {
return
}