Repository navigation
Conversation
A host candidate paired with a remote relay was averaged with the host score, so it outranked a server-reflexive pair that never uses TURN. Automatic renomination stayed on the relay.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
A host candidate paired with a remote relay was scored as the average of host and relay. That average is 55, so the TURN path outranked a server-reflexive pair at 50 even when the direct pair had the lower round trip time. Automatic renomination kept selecting the relay.
A path that uses a relay candidate now scores as relay. A succeeded path that does not use TURN outranks every relayed pair, and renomination will leave the relay for that path. Two candidates that are both direct still rank by their type average and round trip time. A relay is not selected in place of a path that is already direct.
TestDirectPairBeatsPairWithRelayOnOneSidefailed before this change: the direct score 53.98 was not greater than the relayed score 57.52, and the best pair was the relay. With the change, the direct pair scores higher and is selected.TestCandidatePairQualityTypeScoresand the existing renomination cases passed.golangci-lint run --newreported 0 issues.The controlling agent already has both pairs in the succeeded state. The score was keeping media on TURN after a direct path was up.
Fixes #1033
Test plan