1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-30 08:06:40 +02:00

Merge pull request #711 from milosgajdos83/node-neighbours

Don't override the neighbours.
This commit is contained in:
Asim Aslam 2019-08-29 15:48:13 +01:00 committed by GitHub
commit b457ec1990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -309,11 +309,11 @@ func (n *network) announce(client transport.Client) {
nodes := make([]*pbNet.Node, len(n.neighbours))
i := 0
for id, _ := range n.neighbours {
pbNode := &pbNet.Node{
nodes[i] = &pbNet.Node{
Id: id,
Address: n.neighbours[id].address,
}
nodes[i] = pbNode
i++
}
n.RUnlock()