mirror: Do not exit upon errors when --watch is passed (#4032)

Currently, when mirror is not able to copy an object (e.g. corrupted)
and watch is specified, mirror will restart mirroring again to stop
again at the same problematic object.

Co-authored-by: Anis Elleuch <anis@min.io>
This commit is contained in:
Anis Elleuch
2022-04-02 16:16:34 -07:00
committed by GitHub
co-authored by Anis Elleuch
parent 033969a0bf
commit 661afae983
+4 -2
View File
@@ -510,11 +510,13 @@ func (mj *mirrorJob) monitorMirrorStatus(cancel context.CancelFunc) (errDuringMi
errDuringMirror = true
}
if mj.opts.activeActive {
// Do not quit mirroring if we are in --watch or --active-active mode
if !mj.opts.activeActive && !mj.opts.isWatch {
cancel()
cancelInProgress = true
continue
}
continue
}
if sURLs.SourceContent != nil {