fix: startup being slow - wait only if IOCount > 0

This commit is contained in:
Harshavardhana
2020-12-02 21:03:45 -08:00
parent c22a387695
commit 44e23b7f4f
2 changed files with 12 additions and 5 deletions

View File

@@ -676,7 +676,9 @@ func (h *healSequence) queueHealTask(source healSource, healType madmin.HealItem
}
// Wait and proceed if there are active requests
waitForLowHTTPReq(opts.IOCount, opts.Sleep)
if opts.IOCount > 0 {
waitForLowHTTPReq(opts.IOCount, opts.Sleep)
}
h.mutex.Lock()
h.scannedItemsMap[healType]++