Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion pkg/services/object/get/ec.go
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,17 @@ func (s *Service) copyECPartsRanges(ctx context.Context, dst ChunkWriter, localN
return 0, 0, 0, fmt.Errorf("discard first %d bytes from first part payload stream: %w", partOff, err)
}

rc = fullFirstPart
if lastIdx == 0 && partOff+partLen < fullPartLen {
rc = struct {
io.Reader
io.Closer
}{
Reader: io.LimitReader(fullFirstPart, int64(partLen)),
Closer: fullFirstPart,
}
} else {
rc = fullFirstPart
}
} else {
callCtx, cancel := context.WithTimeout(ctx, callTimeout)
defer cancel()
Expand Down
Loading