diff --git a/backend/hdfs/object.go b/backend/hdfs/object.go index 0bca37f48..51acb17ff 100644 --- a/backend/hdfs/object.go +++ b/backend/hdfs/object.go @@ -142,7 +142,13 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op } } - _, err = io.Copy(out, in) + err = o.fs.pacer.Call(func() (bool, error) { + _, err = io.Copy(out, in) + if err == nil { + return false, nil + } + return errors.Is(err, io.ErrUnexpectedEOF), err + }) if err != nil { fs.Errorf(o, "update: io.Copy returned error: %v", err) cleanup()