diff --git a/pkg/sources/chunker.go b/pkg/sources/chunker.go index aafb8e45181e..4fb0f321ec2f 100644 --- a/pkg/sources/chunker.go +++ b/pkg/sources/chunker.go @@ -34,7 +34,7 @@ func Chunker(originalChunk *Chunk) chan *Chunk { chunkBytes := make([]byte, TotalChunkSize) chunk := *originalChunk chunkBytes = chunkBytes[:ChunkSize] - n, err := reader.Read(chunkBytes) + n, err := io.ReadFull(reader, chunkBytes) if n > 0 { peekData, _ := reader.Peek(TotalChunkSize - n) chunkBytes = append(chunkBytes[:n], peekData...)