From 6cbe56adfe43a9d95781f110611c4188b34b34c8 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sat, 25 May 2024 06:15:36 -0500 Subject: [PATCH] fix incorrect pool use --- src/core/core.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/core.go b/src/core/core.go index 79c59d5..41858cb 100644 --- a/src/core/core.go +++ b/src/core/core.go @@ -212,7 +212,7 @@ func (c *Core) ReadFrom(p []byte) (n int, from net.Addr, err error) { func (c *Core) WriteTo(p []byte, addr net.Addr) (n int, err error) { buf := allocBytes(0) - defer freeBytes(buf) + defer func() { freeBytes(buf) }() buf = append(buf, typeSessionTraffic) buf = append(buf, p...) n, err = c.PacketConn.WriteTo(buf, addr)