Skip to content

Commit bd91926

Browse files
make sure to avoid closing the input reader (#2137)
1 parent 94f7e5e commit bd91926

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hook-reader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (hr *hookReader) Read(b []byte) (n int, err error) {
8484
// reports the data read from the source to the hook.
8585
func newHook(source, hook io.Reader) io.Reader {
8686
if hook == nil {
87-
return source
87+
return &hookReader{source: source}
8888
}
8989
return &hookReader{
9090
source: source,

0 commit comments

Comments
 (0)