wgengine/magicsock: remove redundant/wrong sharedDiscoKey delete
The pass just after in this method handles cleaning up sharedDiscoKey.
No need to do it wrong (assuming DiscoKey => 1 node) earlier.
Updates
@@ -2179,9 +2179,6 @@ func (c *Conn) SetNetworkMap(nm *netmap.NetworkMap) {
c.peerMap.forEachDiscoEndpoint(func(ep *endpoint) {
if !keep[ep.publicKey] {
c.peerMap.deleteDiscoEndpoint(ep)
- if !ep.discoKey.IsZero() {
- delete(c.sharedDiscoKey, ep.discoKey)
- }
}
})
}
