Skip to content
Snippets Groups Projects
Commit 281808b9 authored by Christoph Petrausch's avatar Christoph Petrausch
Browse files

Release lock after updating map. UpdateNewClients may call GetOptions or...

Release lock after updating map. UpdateNewClients may call GetOptions or Clients() and thus cause a deadlock
parent 1337ccc9
No related branches found
No related tags found
No related merge requests found
...@@ -55,9 +55,8 @@ func (c *ClientManager) Register(client RouteTableClient) { ...@@ -55,9 +55,8 @@ func (c *ClientManager) Register(client RouteTableClient) {
// RegisterWithOptions registers a client with options for updates // RegisterWithOptions registers a client with options for updates
func (c *ClientManager) RegisterWithOptions(client RouteTableClient, opt ClientOptions) { func (c *ClientManager) RegisterWithOptions(client RouteTableClient, opt ClientOptions) {
c.mu.Lock() c.mu.Lock()
defer c.mu.Unlock()
c.clients[client] = opt c.clients[client] = opt
c.mu.Unlock()
c.master.UpdateNewClient(client) c.master.UpdateNewClient(client)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment