mirror of
https://github.com/rclone/rclone.git
synced 2024-12-23 07:29:35 +01:00
fs/operations: Clear accounting before low level retry
Statistics of ransfers which were interrupted are not cleared before retry iteration. These transfers completed with over 100 percentage. This change clears transfer accounting before next retry iteration is done in order to keep numbers in track. Fixes #3861
This commit is contained in:
parent
27c3481ea4
commit
b7019a91c2
@ -402,6 +402,7 @@ func Copy(ctx context.Context, f fs.Fs, dst fs.Object, remote string, src fs.Obj
|
||||
// Retry if err returned a retry error
|
||||
if fserrors.IsRetryError(err) || fserrors.ShouldRetry(err) {
|
||||
fs.Debugf(src, "Received error: %v - low level retry %d/%d", err, tries, maxTries)
|
||||
tr.Reset() // skip incomplete accounting - will be overwritten by retry
|
||||
continue
|
||||
}
|
||||
// otherwise finish
|
||||
|
Loading…
Reference in New Issue
Block a user