mirror of
https://github.com/fatedier/frp.git
synced 2026-05-21 06:45:32 -06:00
fix incorrect use of snappy pool (#3549)
This commit is contained in:
parent
6430afcfa5
commit
e9e12cf888
11 changed files with 22 additions and 25 deletions
|
|
@ -142,10 +142,9 @@ func (pxy *BaseProxy) HandleTCPWorkConnection(workConn net.Conn, m *msg.StartWor
|
|||
return
|
||||
}
|
||||
}
|
||||
var compressionResourceRecycleFn func()
|
||||
if baseConfig.UseCompression {
|
||||
var releaseFn func()
|
||||
remote, releaseFn = libio.WithCompressionFromPool(remote)
|
||||
defer releaseFn()
|
||||
remote, compressionResourceRecycleFn = libio.WithCompressionFromPool(remote)
|
||||
}
|
||||
|
||||
// check if we need to send proxy protocol info
|
||||
|
|
@ -215,4 +214,7 @@ func (pxy *BaseProxy) HandleTCPWorkConnection(workConn net.Conn, m *msg.StartWor
|
|||
if len(errs) > 0 {
|
||||
xl.Trace("join connections errors: %v", errs)
|
||||
}
|
||||
if compressionResourceRecycleFn != nil {
|
||||
compressionResourceRecycleFn()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue