mirror of
https://github.com/fatedier/frp.git
synced 2025-07-20 04:39:26 +07:00
fix incorrect use of snappy pool (#3549)
This commit is contained in:
@ -175,9 +175,7 @@ func (pxy *HTTPProxy) GetRealConn(remoteAddr string) (workConn net.Conn, err err
|
||||
}
|
||||
}
|
||||
if pxy.cfg.UseCompression {
|
||||
var releaseFn func()
|
||||
rwc, releaseFn = libio.WithCompressionFromPool(rwc)
|
||||
defer releaseFn()
|
||||
rwc = libio.WithCompression(rwc)
|
||||
}
|
||||
|
||||
if pxy.GetLimiter() != nil {
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user