From a6f4de81728e0f07914fb4f5af9abd2537a3360a Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 15 Jul 2013 08:00:15 -0400 Subject: [PATCH] Also exclude upstream when picking supernode for multicast propagation, to not bounce back and forth to the same supernode. --- node/Multicaster.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/node/Multicaster.hpp b/node/Multicaster.hpp index 1addf42d0..9c28e1c27 100644 --- a/node/Multicaster.hpp +++ b/node/Multicaster.hpp @@ -263,7 +263,10 @@ public: // Add a supernode if there are fewer than the desired // number of recipients. if (chosen < max) { - P peer = topology.getBestSupernode(&originalSubmitter,1,true); + Address avoid[2]; + avoid[0] = originalSubmitter; + avoid[1] = upstream; + P peer = topology.getBestSupernode(avoid,2,true); if (peer) peers[chosen++] = peer; }