Frequent Disconnection when connected through prflx

Hi,

I am facing frequency ICE failure / disconnection. So, I do frequent ICE_RESTARTs.
when analysed, I found that peer connections connected through prflx is facing such issues.

So, I tried not adding prflx candidates for trickling as shown below

/* Render the candidate and add it to the remote_candidates cache for the admin API /
gboolean testRelay = TRUE;
if(candidate->type != NICE_CANDIDATE_TYPE_PEER_REFLEXIVE || testRelay ) {
if(candidate->type == NICE_CANDIDATE_TYPE_PEER_REFLEXIVE){
JANUS_LOG(LOG_VERB, “[%“SCNu64”] Force Priority: %d\n”, handle->handle_id, candidate->priority);
JANUS_LOG(LOG_VERB, “[%“SCNu64”] Force Foundation: %s\n”, handle->handle_id, candidate->foundation);
JANUS_LOG(LOG_ERR, “[%“SCNu64”] We are forcefully ignoring prflx candidates here\n”, handle->handle_id);
}
/
… but only if it’s ‘prflx’, the others we add ourselves */
goto candidatedone;
}

But still peer connections is connected through prflx.

What am I missing here?

@lorenzo

prflx are not advertised via trickle or SDP, they’re candidates discovered at runtime.

"i can see that peer rflx is found by libnice and it is giving the candidate as callback. But even if i am not setting this candidate in nice_agent_set_remote_candidates,libnice makes use of the peer rflx candidates. So peer rflx can’t be avoided for peer connection since it was found by libnice and it uses this internally ?

Yes, that’s how it works.