cannot set sessionState to empty string otherwise the BackupSession does not get updated and the other targets won't Finalize

This commit is contained in:
Jean-Marc ANDRE 2023-04-17 01:09:42 +02:00
parent 8975f77e58
commit 65d880180b

View File

@ -83,7 +83,7 @@ func (s Session) checkSessionState(
// We still want to run Finalize for all the targets (continue) // We still want to run Finalize for all the targets (continue)
// but we also don't want to move the global BackupSession to Success (rewrite sessionState) // but we also don't want to move the global BackupSession to Success (rewrite sessionState)
// When the Job is over, it will move the target state to Finalized and we'll be fine // When the Job is over, it will move the target state to Finalized and we'll be fine
defer func() { sessionState = "" }() defer func() { sessionState = waitState }()
continue continue
default: default:
if i == len(tss)-1 { if i == len(tss)-1 {