mirror of https://github.com/tailscale/tailscale/
wgengine/magicsock: simplify peerMap.upsertEndpoint
We can do the "maybe delete" check unilaterally: In the case of an insert, both oldDiscoKey and ep.discoKey will be the zero value. And since we don't use pi again, we can skip giving it a name, which makes scoping clearer. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>pull/3328/head
parent
9da22dac3d
commit
773af7292b
Loading…
Reference in New Issue