Skip to content

Commit

Permalink
fix: check for ErrUnexpectedEOF in ParseDataSegmentIndexAsync
Browse files Browse the repository at this point in the history
ReadFull replaces io.EOF with io.ErrUnexpectedEOF that we need to check for
  • Loading branch information
ischasny committed Nov 29, 2023
1 parent 53b3ec9 commit 94c6350
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datasegment/parse_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func ParseDataSegmentIndexAsync(ctx context.Context, unpaddedReader io.Reader, r
default:
_, err := io.ReadFull(unpaddedReader, unpaddedBuf)
if err != nil {
if errors.Is(err, io.EOF) {
if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) {
return nil
} else {
return xerrors.Errorf("reading 127 bytes from parsing: %w", err)
Expand Down

0 comments on commit 94c6350

Please sign in to comment.