mirror of
https://github.com/tailscale/tailscale.git
synced 2026-04-05 07:03:43 -04:00
wgengine/magicsock: call peerMap.validate at the end of SetNetworkMap
Not for prod, maybe useful for debugging.
This commit is contained in:
@@ -2264,6 +2264,11 @@ func nodesEqual(x, y []*tailcfg.Node) bool {
|
||||
func (c *Conn) SetNetworkMap(nm *netmap.NetworkMap) {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
defer func() {
|
||||
if err := c.peerMap.validate(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}()
|
||||
|
||||
if c.closed {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user