mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
tstest/integration/testcontrol: fix data race
Fix race from 1ec99e99f4
Fixes #3289
Change-Id: I58158d3f82339ac171fb14827c5f158d602327f4
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
5b94f67956
commit
f7da8c77bd
@ -157,10 +157,11 @@ func (s *Server) AddPingRequest(nodeKeyDst key.NodePublic, pr *tailcfg.PingReque
|
||||
// Mark the Node key of every node as expired
|
||||
func (s *Server) SetExpireAllNodes(expired bool) {
|
||||
s.mu.Lock()
|
||||
s.allExpired = expired
|
||||
s.mu.Unlock()
|
||||
defer s.mu.Unlock()
|
||||
|
||||
for _, node := range s.AllNodes() {
|
||||
s.allExpired = expired
|
||||
|
||||
for _, node := range s.nodes {
|
||||
sendUpdate(s.updates[node.ID], updateSelfChanged)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user