Skip to content

Commit 4c85d3e

Browse files
committed
DecoderWrapper.Close should return the decoder to the pool when there isn't an error closing it
1 parent 9715f8e commit 4c85d3e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

decoderpool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type DecoderWrapper struct {
4848
// the pool.
4949
func (w *DecoderWrapper) Close() {
5050
err := w.Decoder.Reset(nil)
51-
if err != nil {
51+
if err == nil {
5252
w.pool.Put(w)
5353
}
5454
}

0 commit comments

Comments
 (0)