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