1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-09-16 09:36:18 +02:00

Reset gzip encoder on put to pool

This commit is contained in:
DarthSim
2019-01-31 18:43:41 +06:00
parent 0c2da110db
commit 6007f1a99b

View File

@@ -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}
}