Skip to content

agent: ice restart will also reset the local candidates

With this patch issuing an ICE restart on the agent, or on a stream will also reset the list of local candidates, and not just the remote candidates. It will allow to take into account the creation of new network interfaces after the agent has already established a successfull connection. The selected pairs or the previous connection check remain available, until a new set of pairs have been established.

This patch causes an API change:

  • the client is now expected to collect again the local candidates, by calling eventually nice_agent_add_local_address() to add candidates manually, and by finishing the collection with nice_agent_gather_candidates() and waiting the for gathering-done signal, just like the case of a newly created agent.

  • when ICE is restarted, the agent now makes a transition to state disconnected first, until nice_agent_gather_candidates() is called, where the agent moves to state gathering there.

Merge request reports