aboutsummaryrefslogtreecommitdiff
path: root/compress.go
diff options
context:
space:
mode:
authorGravatar Aliaksandr Valialkin <valyala@gmail.com> 2015-12-29 15:10:14 +0200
committerGravatar Aliaksandr Valialkin <valyala@gmail.com> 2015-12-29 15:10:14 +0200
commit95093e35cf6ba8100f03f95d3d2e91b6c53b5bbc (patch)
tree39bf0a1dec0ce846a702ce96c533ddfd4b4815c6 /compress.go
parentFixed a typo (diff)
downloadfasthttp-95093e35cf6ba8100f03f95d3d2e91b6c53b5bbc.tar.gz
fasthttp-95093e35cf6ba8100f03f95d3d2e91b6c53b5bbc.tar.bz2
fasthttp-95093e35cf6ba8100f03f95d3d2e91b6c53b5bbc.zip
Removed redundant Reset() calls on bufio.Reader/bufio.Writer/gzipWriter/flateWriter before returning them to the pool, since Reset() is immediately called after these instances are obtained from pool
Diffstat (limited to 'compress.go')
-rw-r--r--compress.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/compress.go b/compress.go
index d9f28b3..18e2d8d 100644
--- a/compress.go
+++ b/compress.go
@@ -89,7 +89,6 @@ func acquireGzipWriter(w io.Writer, level int) *gzipWriter {
func releaseGzipWriter(zw *gzipWriter) {
zw.Close()
- zw.Reset(nil)
zw.p.Put(zw)
}
@@ -133,7 +132,6 @@ func acquireFlateWriter(w io.Writer, level int) *flateWriter {
func releaseFlateWriter(zw *flateWriter) {
zw.Close()
- zw.Reset(nil)
zw.p.Put(zw)
}