yandex: fix 400 Bad Request on transfer failure

Before this fix, if the upload failed for some reason the yandex
backend would attempt to retry itself it which would fail immediately
with 400 Bad Request.

Normally we retry uploads at a higher level so they can be done with
new data and this patch does that.

See #7044
This commit is contained in:
Nick Craig-Wood 2023-06-09 18:03:05 +01:00
parent f3070b82bc
commit 055206c4ee

View File

@ -1100,7 +1100,7 @@ func (o *Object) upload(ctx context.Context, in io.Reader, overwrite bool, mimeT
NoResponse: true, NoResponse: true,
} }
err = o.fs.pacer.Call(func() (bool, error) { err = o.fs.pacer.CallNoRetry(func() (bool, error) {
resp, err = o.fs.srv.Call(ctx, &opts) resp, err = o.fs.srv.Call(ctx, &opts)
return shouldRetry(ctx, resp, err) return shouldRetry(ctx, resp, err)
}) })