mirror of
https://github.com/fatedier/frp.git
synced 2025-07-27 07:35:07 +00:00
fix a race condition issue (#3536)
This commit is contained in:
@@ -175,7 +175,9 @@ func (pxy *HTTPProxy) GetRealConn(remoteAddr string) (workConn net.Conn, err err
|
||||
}
|
||||
}
|
||||
if pxy.cfg.UseCompression {
|
||||
rwc = libio.WithCompression(rwc)
|
||||
var releaseFn func()
|
||||
rwc, releaseFn = libio.WithCompressionFromPool(rwc)
|
||||
defer releaseFn()
|
||||
}
|
||||
|
||||
if pxy.GetLimiter() != nil {
|
||||
|
@@ -241,7 +241,9 @@ func (pxy *BaseProxy) handleUserTCPConnection(userConn net.Conn) {
|
||||
}
|
||||
}
|
||||
if cfg.UseCompression {
|
||||
local = libio.WithCompression(local)
|
||||
var releaseFn func()
|
||||
local, releaseFn = libio.WithCompressionFromPool(local)
|
||||
defer releaseFn()
|
||||
}
|
||||
|
||||
if pxy.GetLimiter() != nil {
|
||||
|
Reference in New Issue
Block a user