Skip to content

Commit

Permalink
fix: copyOnce in split retrier may be called more than once (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous authored Jul 1, 2024
1 parent eb162ca commit c285903
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Android/app/src/go/intra/split/retrier.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,9 @@ func copyOnce(dst io.Writer, src io.Reader) (int64, error) {

func (r *retrier) ReadFrom(reader io.Reader) (bytes int64, err error) {
for !r.retryCompleted() {
if bytes, err = copyOnce(r, reader); err != nil {
n, e := copyOnce(r, reader)
bytes += n
if err = e; err != nil {
return
}
}
Expand Down

0 comments on commit c285903

Please sign in to comment.