From cbaa92dcb21feb199cdd1ccf08d776359fd67437 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Wed, 16 Dec 2015 13:46:37 +0000 Subject: [PATCH] Revert "don't broadcast-gossip other peer when adding a connection" while we consider how to fix it properly. This reverts commit cbb2ad018da70c52578cc694f65379c83db01114. --- mesh/local_peer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mesh/local_peer.go b/mesh/local_peer.go index d26ad5a3..72262e59 100644 --- a/mesh/local_peer.go +++ b/mesh/local_peer.go @@ -157,7 +157,7 @@ func (peer *LocalPeer) handleAddConnection(conn Connection) error { } peer.router.Routes.Recalculate() - peer.broadcastPeerUpdate() + peer.broadcastPeerUpdate(conn.Remote()) return nil } @@ -199,13 +199,13 @@ func (peer *LocalPeer) handleDeleteConnection(conn Connection) { // helpers -func (peer *LocalPeer) broadcastPeerUpdate() { +func (peer *LocalPeer) broadcastPeerUpdate(peers ...*Peer) { // Some tests run without a router. This should be fixed so // that the relevant part of Router can be easily run in the // context of a test, but that will involve significant // reworking of tests. if peer.router != nil { - peer.router.BroadcastTopologyUpdate([]*Peer{peer.Peer}) + peer.router.BroadcastTopologyUpdate(append(peers, peer.Peer)) } }