mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-21 14:11:56 +00:00
tstest/integration/testcontrol: fix data race
Noticed in earlier GitHub actions failure. Fixes #11994 Change-Id: Iba8d753caaa3dacbe2da9171d96c5f99b12e62d7 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
e9505e5432
commit
b62cfc430a
@ -13,6 +13,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
|
"maps"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
@ -914,7 +915,12 @@ func (s *Server) MapResponse(req *tailcfg.MapRequest) (res *tailcfg.MapResponse,
|
|||||||
// node key rotated away (once test server supports that)
|
// node key rotated away (once test server supports that)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
node.CapMap = s.nodeCapMaps[nk]
|
|
||||||
|
s.mu.Lock()
|
||||||
|
nodeCapMap := maps.Clone(s.nodeCapMaps[nk])
|
||||||
|
s.mu.Unlock()
|
||||||
|
|
||||||
|
node.CapMap = nodeCapMap
|
||||||
node.Capabilities = append(node.Capabilities, tailcfg.NodeAttrDisableUPnP)
|
node.Capabilities = append(node.Capabilities, tailcfg.NodeAttrDisableUPnP)
|
||||||
|
|
||||||
user, _ := s.getUser(nk)
|
user, _ := s.getUser(nk)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user