summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-07-15 08:00:15 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-07-15 08:00:15 -0400
commita6f4de81728e0f07914fb4f5af9abd2537a3360a (patch)
treec570f81b87bad24385fff6d4f15bdf5641302813
parent1d36ea8ddf064bddde39675a88d672904a437c62 (diff)
downloadinfinitytier-a6f4de81728e0f07914fb4f5af9abd2537a3360a.tar.gz
infinitytier-a6f4de81728e0f07914fb4f5af9abd2537a3360a.zip
Also exclude upstream when picking supernode for multicast propagation, to not bounce back and forth to the same supernode.
-rw-r--r--node/Multicaster.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/node/Multicaster.hpp b/node/Multicaster.hpp
index 1addf42d..9c28e1c2 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;
}