mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
wgengine/magicsock: only set addrByKey once in CreateEndpoint.
Signed-Off-By: David Anderson <danderson@tailscale.com>
This commit is contained in:
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…
Reference in New Issue
Block a user