heal: Fix periodic healing cleanup (#10569)

isEnded() was incorrectly calculating if the current healing sequence is
ended or not. h.currentStatus.Items could be empty if healing is very
slow and mc admin heal consumed all items.
This commit is contained in:
Anis Elleuch 2020-09-25 18:29:00 +01:00 committed by GitHub
parent 4de88e87bb
commit b302c8a5f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -528,7 +528,7 @@ func (h *healSequence) hasEnded() bool {
if h.clientToken == bgHealingUUID {
return false
}
return len(h.currentStatus.Items) == 0 || h.currentStatus.Summary == healStoppedStatus || h.currentStatus.Summary == healFinishedStatus
return !h.endTime.IsZero()
}
// stops the heal sequence - safe to call multiple times.