mirror of
https://github.com/rclone/rclone.git
synced 2025-06-05 20:34:39 +08:00
stats: handle FatalError and NoRetryError when reported to stats
This commit is contained in:

committed by
Nick Craig-Wood

parent
e07a850be3
commit
1b95ca2852
@ -311,11 +311,11 @@ func Run(Retry bool, showStats bool, cmd *cobra.Command, f func() error) {
|
||||
}
|
||||
break
|
||||
}
|
||||
if fserrors.IsFatalError(err) {
|
||||
if fserrors.IsFatalError(err) || accounting.Stats.HadFatalError() {
|
||||
fs.Errorf(nil, "Fatal error received - not attempting retries")
|
||||
break
|
||||
}
|
||||
if fserrors.IsNoRetryError(err) {
|
||||
if fserrors.IsNoRetryError(err) || (accounting.Stats.Errored() && !accounting.Stats.HadRetryError()) {
|
||||
fs.Errorf(nil, "Can't retry this error - not attempting retries")
|
||||
break
|
||||
}
|
||||
|
Reference in New Issue
Block a user