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:
Nick Craig-Wood committed 2026-10-08 17:17:09 +01:00
1 parent df2a2d1127
commit 8a2bed2f71
1 file changed
+1 -1
+1 -1
View File
@@ -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{