Compare commits
1 commit
e844ace43d
...
7b91e998ea
Author | SHA1 | Date | |
---|---|---|---|
7b91e998ea |
1 changed files with 6 additions and 3 deletions
|
@ -172,12 +172,15 @@ func findEndPart(cfg MultiObjectReaderConfig) (index int, length uint64) {
|
|||
func (x *MultiObjectReader) Read(p []byte) (n int, err error) {
|
||||
if x.curReader != nil {
|
||||
n, err = x.curReader.Read(p)
|
||||
if err != nil {
|
||||
if err := x.curReader.Close(); err != nil {
|
||||
return n, err
|
||||
}
|
||||
}
|
||||
if !errors.Is(err, io.EOF) {
|
||||
return n, err
|
||||
}
|
||||
if err = x.curReader.Close(); err != nil {
|
||||
return n, err
|
||||
}
|
||||
|
||||
x.curIndex++
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue