File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,19 @@ var (
2929// methods for sending and receiving multiple datagrams per-syscall. See the 
3030// proposal in https://github.com/golang/go/issues/45886#issuecomment-1218301564. 
3131type  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 
4140	ipv4MsgsPool  sync.Pool 
4241	ipv6MsgsPool  sync.Pool 
42+ 
43+ 	blackhole4  bool 
44+ 	blackhole6  bool 
4345}
4446
4547func  NewStdNetBind () Bind  {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments