Avoid double-nomination of ICE candidate pairs. (#198)

Nomination is blocked once something is nominated rather than waiting until something is selected.
This commit is contained in:
Jonathan Lennox 2020-04-07 18:25:16 -04:00 committed by GitHub
parent 982e78212b
commit ca3868ac26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,10 +103,12 @@ public class DefaultNominator
return;
CandidatePair validPair = (CandidatePair) ev.getSource();
Component parentComponent = validPair.getParentComponent();
IceMediaStream parentStream = parentComponent.getParentStream();
// do not nominate pair if there is currently a selected pair for
// do not nominate pair if there is currently a nominated pair for
// the component
if (validPair.getParentComponent().getSelectedPair() != null)
if (parentStream.validListContainsNomineeForComponent(parentComponent))
{
logger.debug(() ->
"Keep-alive for pair: " + validPair.toShortString());