Skip to content

Commit

Permalink
nitpick: use atomic bool instead of bool for usynced thread access
Browse files Browse the repository at this point in the history
  • Loading branch information
cre4ture committed Sep 16, 2024
1 parent ba7880a commit 39d8332
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion udp/udp_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"
"net"
"net/netip"
"sync/atomic"
"syscall"
"unsafe"

Expand All @@ -23,7 +24,7 @@ import (

type StdConn struct {
sysFd int
closed bool
closed atomic.Bool
isV4 bool
l *logrus.Logger
batch int
Expand Down

0 comments on commit 39d8332

Please sign in to comment.