فهرست منبع

Also exclude upstream when picking supernode for multicast propagation, to not bounce back and forth to the same supernode.

Adam Ierymenko 12 سال پیش
والد
کامیت
a6f4de8172
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      node/Multicaster.hpp

+ 4 - 1
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;
 		}