From 39d8332f146920c535d42883560b90d64f1e79f0 Mon Sep 17 00:00:00 2001 From: Ulrich Hornung Date: Mon, 16 Sep 2024 22:59:17 +0200 Subject: [PATCH] nitpick: use atomic bool instead of bool for usynced thread access --- udp/udp_linux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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