mirror of
https://github.com/go-micro/go-micro.git
synced 2024-11-24 08:02:32 +02:00
No need to lock here since Topology read locks and makes copies
This commit is contained in:
parent
63fd8b9d1b
commit
5c38f38dd9
@ -170,9 +170,6 @@ func (n *node) Nodes() []Node {
|
||||
// GetPeerNode returns a node from node MaxDepth topology
|
||||
// It returns nil if the peer was not found
|
||||
func (n *node) GetPeerNode(id string) *node {
|
||||
n.RLock()
|
||||
defer n.RUnlock()
|
||||
|
||||
// get node topology up to MaxDepth
|
||||
top := n.Topology(MaxDepth)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user