mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Cleanup sing buffer usage
This commit is contained in:
parent
38b175d53e
commit
c01a30e8f4
6 changed files with 11 additions and 14 deletions
|
@ -88,13 +88,13 @@ func (i *Inbound) Process(ctx context.Context, network net.Network, connection s
|
|||
}
|
||||
for _, buffer := range mb {
|
||||
packet := B.As(buffer.Bytes()).ToOwned()
|
||||
buffer.Release()
|
||||
err = i.service.NewPacket(ctx, pc, packet, metadata)
|
||||
if err != nil {
|
||||
packet.Release()
|
||||
buf.ReleaseMulti(mb)
|
||||
return err
|
||||
}
|
||||
buffer.Release()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue