mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
A few more tweaks to MC algo...
This commit is contained in:
parent
0bcac1fd79
commit
acac88cf77
1 changed files with 3 additions and 3 deletions
|
@ -192,7 +192,7 @@ void Multicaster::send(
|
||||||
nwid,
|
nwid,
|
||||||
com,
|
com,
|
||||||
limit,
|
limit,
|
||||||
2, // we'll still gather a little from peers to keep multicast list fresh
|
1, // we'll still gather a little from peers to keep multicast list fresh
|
||||||
src,
|
src,
|
||||||
mg,
|
mg,
|
||||||
etherType,
|
etherType,
|
||||||
|
@ -214,7 +214,7 @@ void Multicaster::send(
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long idx = 0;
|
unsigned long idx = 0;
|
||||||
while (count < limit) {
|
while (count < limit) { // limit <= gs.members.size() so idx will never overflow here
|
||||||
const MulticastGroupMember &m = gs.members[indexes[idx++]];
|
const MulticastGroupMember &m = gs.members[indexes[idx++]];
|
||||||
|
|
||||||
{ // TODO / LEGACY: don't send new multicast frame to old peers (if we know their version)
|
{ // TODO / LEGACY: don't send new multicast frame to old peers (if we know their version)
|
||||||
|
@ -246,7 +246,7 @@ void Multicaster::send(
|
||||||
outp.armor(sn->key(),true);
|
outp.armor(sn->key(),true);
|
||||||
sn->send(RR,outp.data(),outp.size(),now);
|
sn->send(RR,outp.data(),outp.size(),now);
|
||||||
}
|
}
|
||||||
gatherLimit = 0; // don't need to gather from peers this time since we consulted the core
|
gatherLimit = 1; // we still gather a bit from peers as well
|
||||||
}
|
}
|
||||||
|
|
||||||
gs.txQueue.push_back(OutboundMulticast());
|
gs.txQueue.push_back(OutboundMulticast());
|
||||||
|
|
Loading…
Add table
Reference in a new issue