Remove forgotten lock

This commit is contained in:
Kristoffer Dalby 2021-08-06 20:02:47 +01:00
parent db4f49901e
commit 5bc5c5dc1b
No known key found for this signature in database
GPG key ID: 09F62DC067465735

View file

@ -50,13 +50,11 @@ func (h *Headscale) EnableNodeRoute(namespace string, nodeName string, routeStr
// Definetely not accessible from the CLI tool. // Definetely not accessible from the CLI tool.
// We need RPC to the server - or some kind of 'needsUpdate' field in the DB // We need RPC to the server - or some kind of 'needsUpdate' field in the DB
peers, _ := h.getPeers(*m) peers, _ := h.getPeers(*m)
h.pollMu.Lock()
for _, p := range *peers { for _, p := range *peers {
if pUp, ok := h.clientsPolling.Load(uint64(p.ID)); ok { if pUp, ok := h.clientsPolling.Load(uint64(p.ID)); ok {
pUp.(chan []byte) <- []byte{} pUp.(chan []byte) <- []byte{}
} }
} }
h.pollMu.Unlock()
return &rIP, nil return &rIP, nil
} }
} }