diff --git a/caddyhttp/gzip/setup.go b/caddyhttp/gzip/setup.go index f86d89c5..73107baa 100644 --- a/caddyhttp/gzip/setup.go +++ b/caddyhttp/gzip/setup.go @@ -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 {