0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2025-01-06 22:40:31 -05:00

gzip: cleaned up writer pool initialization code (#1695)

This commit is contained in:
Andrew Steinborn 2017-05-30 20:29:28 -04:00 committed by Matt Holt
parent 20a047f7e1
commit baf269d4e2

View file

@ -146,11 +146,7 @@ func initWriterPool() {
// add default writer pool
defaultWriterPoolIndex = i
writerPool[defaultWriterPoolIndex] = &sync.Pool{
New: func() interface{} {
return gzip.NewWriter(ioutil.Discard)
},
}
writerPool[defaultWriterPoolIndex] = newWriterPool(gzip.DefaultCompression)
}
func getWriter(level int) *gzip.Writer {