lib/encoding/zstd: call zstd.Decoder.Close instead of zstd.Decoder.Reset in order to free up occupied goroutines

This should fix goroutine leak for https://github.com/klauspost/compress/issues/195
This commit is contained in:
Aliaksandr Valialkin 2019-12-23 18:31:32 +02:00
parent 335bd0ac0a
commit 108a60d69e

View File

@ -32,7 +32,7 @@ func (r *Reader) Read(p []byte) (int, error) {
// Release releases r.
func (r *Reader) Release() {
r.d.Reset(nil)
r.d.Close(nil)
r.d = nil
}