mirror of
https://github.com/go-micro/go-micro.git
synced 2025-08-10 21:52:01 +02:00
No need to lock here since Topology read locks and makes copies
This commit is contained in:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user