forked from TrueCloudLab/rclone
hdfs: retry the io.Copy to see if that helps FIXME DO NOT MERGE
This commit is contained in:
parent
010ed973df
commit
656ef8952f
1 changed files with 7 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue