1
0
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:
Asim Aslam
2019-10-18 10:29:14 +01:00
committed by Milos Gajdos
parent 63fd8b9d1b
commit 5c38f38dd9

View File

@@ -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)