wgengine/magicsock: only set addrByKey once in CreateEndpoint.

Signed-Off-By: David Anderson <danderson@tailscale.com>
pull/151/head
David Anderson 5 years ago committed by Dave Anderson
parent fbab12c94c
commit 97e58ad44d

@ -1258,8 +1258,8 @@ func (c *Conn) CreateEndpoint(key [32]byte, addrs string) (conn.Endpoint, error)
copy(epAddr.ip.Addr[:], addr.IP.To16())
epAddr.port = uint16(addr.Port)
c.addrsByUDP[epAddr] = a
c.addrsByKey[key] = a
}
c.addrsByKey[key] = a
c.addrsMu.Unlock()
return a, nil

Loading…
Cancel
Save