diff --git a/udp/udp_linux.go b/udp/udp_linux.go index ac9cba796..6f06c0424 100644 --- a/udp/udp_linux.go +++ b/udp/udp_linux.go @@ -8,6 +8,7 @@ import ( "fmt" "net" "net/netip" + "sync/atomic" "syscall" "unsafe" @@ -23,7 +24,7 @@ import ( type StdConn struct { sysFd int - closed bool + closed atomic.Bool isV4 bool l *logrus.Logger batch int