chore: use mutex around blockEndpoints (#8209)

https://github.com/coder/coder/actions/runs/5378950122/jobs/9759972142
This commit is contained in:
Kyle Carberry
2023-06-26 10:01:50 -05:00
committed by GitHub
parent 4539ce7db6
commit f40865bc2f
+2
View File
@@ -709,9 +709,11 @@ func (c *Conn) selfNode() *Node {
DERPLatency: derpLatency,
DERPForcedWebsocket: derpForcedWebsocket,
}
c.mutex.Lock()
if c.blockEndpoints {
node.Endpoints = nil
}
c.mutex.Unlock()
return node
}