Revert "don't broadcast-gossip other peer when adding a connection"
while we consider how to fix it properly.
This reverts commit cbb2ad018d.
This commit is contained in:
1 parent
f09d87c112
commit
cbaa92dcb2
1 file changed
+3
-3
+3
-3
@@ -157,7 +157,7 @@ func (peer *LocalPeer) handleAddConnection(conn Connection) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
peer.router.Routes.Recalculate()
|
peer.router.Routes.Recalculate()
|
||||||
peer.broadcastPeerUpdate()
|
peer.broadcastPeerUpdate(conn.Remote())
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -199,13 +199,13 @@ func (peer *LocalPeer) handleDeleteConnection(conn Connection) {
|
|||||||
|
|
||||||
// helpers
|
// helpers
|
||||||
|
|
||||||
func (peer *LocalPeer) broadcastPeerUpdate() {
|
func (peer *LocalPeer) broadcastPeerUpdate(peers ...*Peer) {
|
||||||
// Some tests run without a router. This should be fixed so
|
// Some tests run without a router. This should be fixed so
|
||||||
// that the relevant part of Router can be easily run in the
|
// that the relevant part of Router can be easily run in the
|
||||||
// context of a test, but that will involve significant
|
// context of a test, but that will involve significant
|
||||||
// reworking of tests.
|
// reworking of tests.
|
||||||
if peer.router != nil {
|
if peer.router != nil {
|
||||||
peer.router.BroadcastTopologyUpdate([]*Peer{peer.Peer})
|
peer.router.BroadcastTopologyUpdate(append(peers, peer.Peer))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user