Fix custom policy parsing bug mentioned in issue #1507
This commit is contained in:
parent
f0e824416b
commit
1c6fd4125d
3 changed files with 7 additions and 5 deletions
|
@ -95,7 +95,6 @@ SharedPtr<Bond> Bond::createTransportTriggeredBond(const RuntimeEnvironment* ren
|
|||
int64_t identity = peer->identity().address().toInt();
|
||||
Bond* bond = nullptr;
|
||||
if (! _bonds.count(identity)) {
|
||||
std::string policyAlias;
|
||||
if (! _policyTemplateAssignments.count(identity)) {
|
||||
if (_defaultPolicy) {
|
||||
bond = new Bond(renv, _defaultPolicy, peer);
|
||||
|
@ -1717,6 +1716,7 @@ void Bond::setBondParameters(int policy, SharedPtr<Bond> templateBond, bool useT
|
|||
/* If a user has specified custom parameters for this bonding policy, overlay them onto the defaults */
|
||||
if (useTemplate) {
|
||||
_policyAlias = templateBond->_policyAlias;
|
||||
_policy = templateBond->policy();
|
||||
_failoverInterval = templateBond->_failoverInterval >= ZT_BOND_FAILOVER_MIN_INTERVAL ? templateBond->_failoverInterval : ZT_BOND_FAILOVER_MIN_INTERVAL;
|
||||
_downDelay = templateBond->_downDelay;
|
||||
_upDelay = templateBond->_upDelay;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue