mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-18 22:17:44 +02:00
Node API allows us to drop all network locks
Network locks are now needed only when accessing client map. node map access is serialied with the node mutex.
This commit is contained in:
@ -22,11 +22,8 @@ func (n *Network) ListPeers(ctx context.Context, req *pbNet.PeerRequest, resp *p
|
||||
depth = network.MaxDepth
|
||||
}
|
||||
|
||||
// get node peers
|
||||
nodePeers := n.Network.Peers()
|
||||
|
||||
// get peers encoded into protobuf
|
||||
peers := network.PeersToProto(n.Network, nodePeers, depth)
|
||||
peers := network.PeersToProto(n.Network, depth)
|
||||
|
||||
resp.Peers = peers
|
||||
|
||||
|
Reference in New Issue
Block a user