mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 23:07:44 +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 @@
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"maps"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"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)
|
||||
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)
|
||||
|
||||
user, _ := s.getUser(nk)
|
||||
|
Loading…
x
Reference in New Issue
Block a user