mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-04 18:33:36 +02:00
Reset gzip encoder on put to pool
This commit is contained in:
@@ -59,5 +59,7 @@ func (p *gzipPool) Put(gz *gzip.Writer) {
|
|||||||
p.mutex.Lock()
|
p.mutex.Lock()
|
||||||
defer p.mutex.Unlock()
|
defer p.mutex.Unlock()
|
||||||
|
|
||||||
|
gz.Reset(ioutil.Discard)
|
||||||
|
|
||||||
p.top = &gzipPoolEntry{gz: gz, next: p.top}
|
p.top = &gzipPoolEntry{gz: gz, next: p.top}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user