Skip to content

Commit

Permalink
DigestReader close origin reader
Browse files Browse the repository at this point in the history
  • Loading branch information
xfali committed Nov 11, 2020
1 parent f5378b5 commit b8df153
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wrap_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ type DigestReader struct {
func (dr *DigestReader) Reader(r io.ReadCloser) io.ReadCloser {
dr.buf.Reset()
_, err := io.Copy(&dr.buf, r)
r.Close()
if err != nil {
return nil
}
Expand Down

0 comments on commit b8df153

Please sign in to comment.