Set new remote credentials after restarting ICE (fixes #2672) #2729
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As explained in #2672, apparently new versions of libnice reset the remote credentials after invoking
nice_agent_restart
: since when receiving updated offers that include a restart we first reset the credentials, and then trigger the restart, this actually results in broken sessions, since the restart ends up not having access to remote credentials for the new STUN exchanges. This patch should address that. Notice this only changes the "browser offering the restart" scenario, since when it's Janus offering a restart, we already performnice_agent_restart
first, and then get the new remote credentials in an answer later on. That said, it might be a good idea to make sure that still does indeed work even for newer versions of libnice.Despite the very small change, it's a PR and not a commit since I want to make sure this doesn't introduce regressions for restarts in current versions of libnice, so please test and provide feedback.