When evaluating the stopping criterion, failed pairs from other streams
having the "use_candidate_on_next_check" flag set should be
ignored.
This should normally not happen, because a pair selected for nomination
has no reason to fail when being rechecked, since it previously
worked... but it may happen with Skype for Business, when libnice
selects a tcp pair for component 1, the peer seems to have no interest
in the second component and lets it fail in the middle of the conncheck.
continue;
for (j = s->conncheck_list; j ; j = j->next) {
CandidateCheckPair *p = j->data;
- if (p->nominated || p->use_candidate_on_next_check) {
+ if (p->nominated || (p->use_candidate_on_next_check &&
+ p->state != NICE_CHECK_FAILED)) {
other_stream_pair = p;
break;
}
CandidateCheckPair *p = j->data;
if (p->component_id == component->id)
continue;
- if (p->nominated || p->use_candidate_on_next_check) {
+ if (p->nominated || (p->use_candidate_on_next_check &&
+ p->state != NICE_CHECK_FAILED)) {
other_component_pair = p;
break;
}