Add low-bandwidth mode

This commit is contained in:
Joseph Henry 2022-12-05 13:21:05 -08:00
parent 98b190c626
commit 3c9ea2b667
No known key found for this signature in database
GPG key ID: C45B33FF5EBC9344
6 changed files with 42 additions and 10 deletions

View file

@ -268,7 +268,8 @@ void Multicaster::send(
const unsigned int gatherLimit = (limit - (unsigned int)gs.members.size()) + 1;
if ((gs.members.empty())||((now - gs.lastExplicitGather) >= ZT_MULTICAST_EXPLICIT_GATHER_DELAY)) {
int timerScale = RR->node->lowBandwidthModeEnabled() ? 3 : 1;
if ((gs.members.empty())||((now - gs.lastExplicitGather) >= (ZT_MULTICAST_EXPLICIT_GATHER_DELAY * timerScale))) {
gs.lastExplicitGather = now;
Address explicitGatherPeers[16];