Skip to content

Commit

Permalink
proper mux lock
Browse files Browse the repository at this point in the history
  • Loading branch information
ivcosla committed Sep 5, 2019
1 parent 50b0588 commit 4ab9c5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/hypervisor/hypervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ func (m *Node) ServeRPC(lis net.Listener) error {
return err
}
addr := conn.RemoteAddr().(*noise.Addr)
m.mu.RLock()
m.mu.Lock()
m.nodes[addr.PK] = appNodeConn{
Addr: addr,
Client: visor.NewRPCClient(rpc.NewClient(conn), visor.RPCPrefix),
}
m.mu.RUnlock()
m.mu.Unlock()
}
}

Expand Down

0 comments on commit 4ab9c5b

Please sign in to comment.