mirror of
https://github.com/rclone/rclone.git
synced 2026-10-09 06:28:15 -04:00
pixeldrain: fix corrupted uploads after a retried upload error
When an upload failed with a retryable error the pacer retried the
whole PUT with the same input stream. The stream had already been
consumed by the first attempt so the retry uploaded an empty file.
This fixes it by using CallNoRetry for the upload, as the other
backends do, so retryable errors are returned wrapped in a RetryError
for the caller to retry the upload with a fresh stream.
(cherry picked from commit f4cd80a535)
This commit is contained in:
1 parent
df2a2d1127
commit
8a2bed2f71
1 file changed
+1
-1
@@ -213,7 +213,7 @@ func (f *Fs) put(
|
||||
// exist yet
|
||||
params.Set("make_parents", "true")
|
||||
|
||||
return node, f.pacer.Call(func() (bool, error) {
|
||||
return node, f.pacer.CallNoRetry(func() (bool, error) {
|
||||
resp, err := f.srv.CallJSON(
|
||||
ctx,
|
||||
&rest.Opts{
|
||||
|
||||
Reference in new issue
Block a user