Chore: adjust all udp alloc size

This commit is contained in:
Dreamacro
2021-11-03 22:26:51 +08:00
parent ebbc9604ce
commit bcb301b730
4 changed files with 8 additions and 3 deletions

View File

@ -49,7 +49,7 @@ func NewUDP(addr string, in chan<- *inbound.PacketAdapter) (*UDPListener, error)
}
go func() {
for {
buf := pool.Get(pool.RelayBufferSize)
buf := pool.Get(pool.UDPBufferSize)
n, remoteAddr, err := l.ReadFrom(buf)
if err != nil {
pool.Put(buf)