diff --git a/cmd/fs-v1-multipart.go b/cmd/fs-v1-multipart.go index 51562bf8d..7c6f9a428 100644 --- a/cmd/fs-v1-multipart.go +++ b/cmd/fs-v1-multipart.go @@ -989,14 +989,14 @@ func (fs fsObjects) cleanupStaleMultipartUpload(bucket string, expiry time.Durat // on all buckets for every `cleanupInterval`, this function is // blocking and should be run in a go-routine. func (fs fsObjects) cleanupStaleMultipartUploads(cleanupInterval, expiry time.Duration, doneCh chan struct{}) { - timer := time.NewTimer(cleanupInterval) + ticker := time.NewTicker(cleanupInterval) for { select { case <-doneCh: // Stop the timer. - timer.Stop() + ticker.Stop() return - case <-timer.C: + case <-ticker.C: bucketInfos, err := fs.ListBuckets() if err != nil { errorIf(err, "Unable to list buckets")