mirror of
https://github.com/rclone/rclone.git
synced 2025-03-31 22:25:14 +08:00
sync: fix incorrect error reported by graceful cutoff - fixes #5203
Before this change, a sync which was finished with a graceful transfer cutoff could return "context canceled" instead of the correct error. This fixes the problem by ignoring "context canceled" errors if we have done a graceful stop.
This commit is contained in:
parent
dc286529bc
commit
54771e4402
@ -266,6 +266,9 @@ func (s *syncCopyMove) processError(err error) {
|
|||||||
// Cancel the march and stop the pipes
|
// Cancel the march and stop the pipes
|
||||||
s.inCancel()
|
s.inCancel()
|
||||||
}
|
}
|
||||||
|
} else if err == context.Canceled && s.inCtx.Err() != nil {
|
||||||
|
// Ignore context Canceled if we have called s.inCancel()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
s.errorMu.Lock()
|
s.errorMu.Lock()
|
||||||
defer s.errorMu.Unlock()
|
defer s.errorMu.Unlock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user