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.
The changes in
5c4c9d5
caused problems because we'd end up creating new identical pairs. For example, if an existing pair,0-0
, exists as local: 192.168.1.33:5445, remote: 192.168.1.33:63461. Then, after processing a new offer another remote candidate would be added for 192.168.1.33:63461, call this pair0-1
. When determining which pair an incoming binding request belonged too we'd then identify0-1
instead of0-0
(becausemax_by_key
) returns the last value on ties. In Chrome this would work correctly, but in Firefox connectivity would be lost.Ultimately adding a new remote candidate that is exactly the same as one that's already part of a viable pair is redundant, so we resolve this issue by simply skipping such candidates.