File tree 1 file changed +11
-9
lines changed
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,19 @@ var (
29
29
// methods for sending and receiving multiple datagrams per-syscall. See the
30
30
// proposal in https://github.com/golang/go/issues/45886#issuecomment-1218301564.
31
31
type StdNetBind struct {
32
- mu sync.Mutex // protects following fields
33
- ipv4 * net.UDPConn
34
- ipv6 * net.UDPConn
35
- blackhole4 bool
36
- blackhole6 bool
37
- ipv4PC * ipv4.PacketConn // will be nil on non-Linux
38
- ipv6PC * ipv6.PacketConn // will be nil on non-Linux
39
-
40
- udpAddrPool sync.Pool // following fields are not guarded by mu
32
+ mu sync.Mutex // protects all fields except as specified
33
+ ipv4 * net.UDPConn
34
+ ipv6 * net.UDPConn
35
+ ipv4PC * ipv4.PacketConn // will be nil on non-Linux
36
+ ipv6PC * ipv6.PacketConn // will be nil on non-Linux
37
+
38
+ // these three fields are not guarded by mu
39
+ udpAddrPool sync.Pool
41
40
ipv4MsgsPool sync.Pool
42
41
ipv6MsgsPool sync.Pool
42
+
43
+ blackhole4 bool
44
+ blackhole6 bool
43
45
}
44
46
45
47
func NewStdNetBind () Bind {
You can’t perform that action at this time.
0 commit comments