fix incorrect use of snappy pool (#3549)

This commit is contained in:
fatedier
2023-07-25 21:31:26 +08:00
committed by GitHub
parent 6430afcfa5
commit e9e12cf888
11 changed files with 22 additions and 25 deletions

View File

@ -241,9 +241,9 @@ func (pxy *BaseProxy) handleUserTCPConnection(userConn net.Conn) {
}
}
if cfg.UseCompression {
var releaseFn func()
local, releaseFn = libio.WithCompressionFromPool(local)
defer releaseFn()
var recycleFn func()
local, recycleFn = libio.WithCompressionFromPool(local)
defer recycleFn()
}
if pxy.GetLimiter() != nil {