Skip to content

Commit c94b152

Browse files
authored
Handle zero-length test reader reads
1 parent d48b7e6 commit c94b152

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/utils/utilio/io_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,9 @@ type blockingReader struct {
426426
}
427427

428428
func (r *blockingReader) Read(p []byte) (int, error) {
429+
if len(p) == 0 {
430+
return 0, nil
431+
}
429432
if !r.sent {
430433
r.sent = true
431434
p[0] = 'x'

0 commit comments

Comments
 (0)