Skip to content

Commit

Permalink
Merge pull request #17 from harshavardhana/pr_out_return_for_multipar…
Browse files Browse the repository at this point in the history
…t_not_break_with_in_the_loop
  • Loading branch information
Harshavardhana committed May 8, 2015
2 parents d5ea763 + 1899203 commit e606d2d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions multipart.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,14 @@ func multiPartInRoutine(reader io.Reader, chunkSize uint64, ch chan Part) {
part := make([]byte, chunkSize)
n, err = io.ReadFull(reader, part)
if err != nil {
if err != io.EOF && err != io.ErrUnexpectedEOF {
if err != io.EOF && err != io.ErrUnexpectedEOF { // catastrophic error
ch <- Part{
Data: nil,
Err: err,
Num: 0,
}
return
}
break
}
num++
ch <- Part{
Expand Down

0 comments on commit e606d2d

Please sign in to comment.