Skip to content

Commit

Permalink
ipn/wg: nil map
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Nov 29, 2024
1 parent 370269d commit aaf29ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion intra/ipn/wg/wgconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ type StdNetBind struct {
blackhole6 bool

epmu sync.RWMutex
eps map[net.Addr]StdNetEndpoint
eps map[net.Addr]StdNetEndpoint // peer-addr => std-net-endpoint

observer rwobserver
sendAddr *core.Volatile[netip.AddrPort] // may be invalid
Expand All @@ -127,6 +127,7 @@ func NewEndpoint(id string, d connector, ep *multihost.MH, f rwobserver, a *Amne
observer: f,
amnezia: a,
floodBa: core.NewKeyedBarrier[int, netip.AddrPort](minFloodInterval),
eps: make(map[net.Addr]StdNetEndpoint),
sendAddr: core.NewZeroVolatile[netip.AddrPort](),
}
return s
Expand Down

1 comment on commit aaf29ab

@ignoramous
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.