mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
fix: possibly using released buffer in tproxy (#1286)
This commit is contained in:
@@ -105,9 +105,9 @@ func listenLocalConn(rAddr, lAddr net.Addr, tunnel C.Tunnel) (*net.UDPConn, erro
|
||||
buf := pool.Get(pool.UDPBufferSize)
|
||||
br, err := lc.Read(buf)
|
||||
if err != nil {
|
||||
pool.Put(buf)
|
||||
if errors.Is(err, net.ErrClosed) {
|
||||
log.Debugln("TProxy local conn listener exit.. rAddr=%s lAddr=%s", rAddr.String(), lAddr.String())
|
||||
pool.Put(buf)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user