mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-03 02:21:58 +00:00
wgengine/magicsock: don't mutexly reach inside Conn to tweak DERP settings.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
committed by
Dave Anderson
parent
f6dd2128d9
commit
fdee5fb639
@@ -308,32 +308,26 @@ func TestTwoDevicePing(t *testing.T) {
|
||||
EndpointsFunc: func(eps []string) {
|
||||
epCh1 <- eps
|
||||
},
|
||||
derpTLSConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer conn1.Close()
|
||||
|
||||
conn1.derpMu.Lock()
|
||||
conn1.derpTLSConfig = &tls.Config{InsecureSkipVerify: true}
|
||||
conn1.derpMu.Unlock()
|
||||
|
||||
epCh2 := make(chan []string, 16)
|
||||
conn2, err := Listen(Options{
|
||||
STUN: []string{stunAddr.String()},
|
||||
EndpointsFunc: func(eps []string) {
|
||||
epCh2 <- eps
|
||||
},
|
||||
derpTLSConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer conn2.Close()
|
||||
|
||||
conn2.derpMu.Lock()
|
||||
conn2.derpTLSConfig = &tls.Config{InsecureSkipVerify: true}
|
||||
conn2.derpMu.Unlock()
|
||||
|
||||
ports := []uint16{conn1.LocalPort(), conn2.LocalPort()}
|
||||
cfgs := makeConfigs(t, ports)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user