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.
This commit is contained in:
@@ -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