dropbox: multiparts uploads retry retry every error after the first chunk is done

This commit is contained in:
Nick Craig-Wood 2017-11-21 10:03:44 +00:00
parent 6f61da5c75
commit 483f4b8ad9

View file

@ -868,7 +868,8 @@ func (o *Object) uploadChunked(in0 io.Reader, commitInfo *files.CommitInfo, size
return false, nil return false, nil
} }
err = o.fs.srv.UploadSessionAppendV2(&appendArg, chunk) err = o.fs.srv.UploadSessionAppendV2(&appendArg, chunk)
return shouldRetry(err) // after the first chunk is uploaded, we retry everything
return err != nil, err
}) })
if err != nil { if err != nil {
return nil, err return nil, err
@ -890,7 +891,8 @@ func (o *Object) uploadChunked(in0 io.Reader, commitInfo *files.CommitInfo, size
return false, nil return false, nil
} }
entry, err = o.fs.srv.UploadSessionFinish(args, chunk) entry, err = o.fs.srv.UploadSessionFinish(args, chunk)
return shouldRetry(err) // after the first chunk is uploaded, we retry everything
return err != nil, err
}) })
if err != nil { if err != nil {
return nil, err return nil, err