Skip to content

Commit aaf29ab

Browse files
committed
ipn/wg: nil map
1 parent 370269d commit aaf29ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

intra/ipn/wg/wgconn.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ type StdNetBind struct {
112112
blackhole6 bool
113113

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

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

0 commit comments

Comments
 (0)