tailscale/wgengine/magicsock
Josh Bleecher Snyder 773af7292b 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>
2021-11-16 15:15:49 -08:00
..
debugknobs.go wgengine/magicsock: remove unused debug knob. 2021-09-01 15:13:21 -07:00
debugknobs_ios.go wgengine/magicsock: remove unused debug knob. 2021-09-01 15:13:21 -07:00
discopingpurpose_string.go wgengine/magicsock: make discoPingPurpose a stringer 2020-09-14 14:29:28 -07:00
magicsock.go wgengine/magicsock: simplify peerMap.upsertEndpoint 2021-11-16 15:15:49 -08:00
magicsock_test.go wgengine/magicsock: fix bug in peerMap.upsertEndpoint 2021-11-16 15:15:49 -08:00