Skip to content
Permalink
Browse files

Reset gzip encoder on put to pool

  • Loading branch information...
DarthSim committed Jan 31, 2019
1 parent 0c2da11 commit 6007f1a99b0127608c7072b12684060a615b777e
Showing with 2 additions and 0 deletions.
  1. +2 −0 gzippool.go
@@ -59,5 +59,7 @@ func (p *gzipPool) Put(gz *gzip.Writer) {
p.mutex.Lock()
defer p.mutex.Unlock()

gz.Reset(ioutil.Discard)

p.top = &gzipPoolEntry{gz: gz, next: p.top}
}

0 comments on commit 6007f1a

Please sign in to comment.
You can’t perform that action at this time.