fix(tailnet): Skip nodes without DERP, avoid use of RemoveAllPeers (#6320)

* fix(tailnet): Skip nodes without DERP, avoid use of RemoveAllPeers
This commit is contained in:
Mathias Fredriksson
2023-02-24 18:16:29 +02:00
committed by GitHub
parent a414de9e81
commit 677721e4a1
10 changed files with 90 additions and 45 deletions
+3 -3
View File
@@ -80,16 +80,16 @@ func TestDERP(t *testing.T) {
})
require.NoError(t, err)
w2Ready := make(chan struct{}, 1)
w2Ready := make(chan struct{})
w2ReadyOnce := sync.Once{}
w1.SetNodeCallback(func(node *tailnet.Node) {
w2.UpdateNodes([]*tailnet.Node{node})
w2.UpdateNodes([]*tailnet.Node{node}, false)
w2ReadyOnce.Do(func() {
close(w2Ready)
})
})
w2.SetNodeCallback(func(node *tailnet.Node) {
w1.UpdateNodes([]*tailnet.Node{node})
w1.UpdateNodes([]*tailnet.Node{node}, false)
})
conn := make(chan struct{})