|
|
@ -502,13 +502,12 @@ func (h *healSequence) isQuitting() bool { |
|
|
|
// check if the heal sequence has ended
|
|
|
|
// check if the heal sequence has ended
|
|
|
|
func (h *healSequence) hasEnded() bool { |
|
|
|
func (h *healSequence) hasEnded() bool { |
|
|
|
h.mutex.RLock() |
|
|
|
h.mutex.RLock() |
|
|
|
|
|
|
|
defer h.mutex.RUnlock() |
|
|
|
// background heal never ends
|
|
|
|
// background heal never ends
|
|
|
|
if h.clientToken == bgHealingUUID { |
|
|
|
if h.clientToken == bgHealingUUID { |
|
|
|
return false |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
ended := len(h.currentStatus.Items) == 0 || h.currentStatus.Summary == healStoppedStatus || h.currentStatus.Summary == healFinishedStatus |
|
|
|
return len(h.currentStatus.Items) == 0 || h.currentStatus.Summary == healStoppedStatus || h.currentStatus.Summary == healFinishedStatus |
|
|
|
h.mutex.RUnlock() |
|
|
|
|
|
|
|
return ended |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// stops the heal sequence - safe to call multiple times.
|
|
|
|
// stops the heal sequence - safe to call multiple times.
|
|
|
|