Avoids getting to the nominators when a selected pair is available for a component. Fixes the way we know that a local pair is a relayed candidate for the FirstHostOrReflexive strategy.
This commit is contained in:
parent
dce3326061
commit
ef03b44b3a
@ -650,9 +650,17 @@ class ConnectivityCheckClient
|
||||
((parentAgent.getCompatibilityMode() ==
|
||||
CompatibilityMode.GTALK) && validPair.isNominated()))
|
||||
{
|
||||
logger.info("Nomination confirmed for pair: " +
|
||||
if(validPair.getParentComponent().getSelectedPair() == null)
|
||||
{
|
||||
logger.info("Nomination confirmed for pair: " +
|
||||
validPair.toShortString());
|
||||
parentAgent.nominationConfirmed( validPair );
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.info("Keep alive for pair: " +
|
||||
validPair.toShortString());
|
||||
parentAgent.nominationConfirmed( validPair );
|
||||
}
|
||||
}
|
||||
//If the agent is the controlled agent, the response may be the result
|
||||
//of a triggered check that was sent in response to a request that
|
||||
@ -662,9 +670,17 @@ class ConnectivityCheckClient
|
||||
else if(checkedPair.useCandidateReceived()
|
||||
&& ! checkedPair.isNominated())
|
||||
{
|
||||
logger.info("Nomination confirmed for pair: " +
|
||||
if(checkedPair.getParentComponent().getSelectedPair() == null)
|
||||
{
|
||||
logger.info("Nomination confirmed for pair: " +
|
||||
validPair.toShortString());
|
||||
parentAgent.nominationConfirmed( checkedPair );
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.info("Keep alive for pair: " +
|
||||
validPair.toShortString());
|
||||
parentAgent.nominationConfirmed( checkedPair );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -86,6 +86,21 @@ public class DefaultNominator
|
||||
return;
|
||||
}
|
||||
|
||||
if(evt.getSource() instanceof CandidatePair)
|
||||
{
|
||||
CandidatePair validPair = (CandidatePair)evt.getSource();
|
||||
|
||||
|
||||
// do not nominate pair if there is currently a selected pair for
|
||||
// the component
|
||||
if(validPair.getParentComponent().getSelectedPair() != null)
|
||||
{
|
||||
logger.info("Keep-alive for pair: " +
|
||||
validPair.toShortString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(strategy == NominationStrategy.NOMINATE_FIRST_VALID)
|
||||
strategyNominateFirstValid(evt);
|
||||
else if (strategy == NominationStrategy.NOMINATE_HIGHEST_PRIO)
|
||||
@ -184,7 +199,9 @@ public class DefaultNominator
|
||||
TimerTask task = validatedCandidates.get(
|
||||
validPair.getParentComponent().toShortString());
|
||||
boolean isRelayed =
|
||||
validPair.getLocalCandidate() instanceof RelayedCandidate ||
|
||||
(validPair.getLocalCandidate() instanceof RelayedCandidate) ||
|
||||
validPair.getLocalCandidate().getType().equals(
|
||||
CandidateType.RELAYED_CANDIDATE) ||
|
||||
validPair.getRemoteCandidate().getType().equals(
|
||||
CandidateType.RELAYED_CANDIDATE);
|
||||
|
||||
@ -235,7 +252,7 @@ public class DefaultNominator
|
||||
/**
|
||||
* Wait time in milliseconds.
|
||||
*/
|
||||
private static final int WAIT_TIME = 1000;
|
||||
private static final int WAIT_TIME = 800;
|
||||
|
||||
/**
|
||||
* The relayed candidate pair.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user