Skip to content

Finish lite-lite candidate selection - #968

Open
JoTurk wants to merge 1 commit into
mainfrom
jo/finish-lite-lite-selection
Open

Finish lite-lite candidate selection#968
JoTurk wants to merge 1 commit into
mainfrom
jo/finish-lite-lite-selection

Conversation

@JoTurk

@JoTurk JoTurk commented Sep 2, 2026

Copy link
Copy Markdown
Member

Description

While testing pion/ice@main against WebRTC, I noticed that TestPeerConnection_IceLite was failing. Pion supports ICE-lite to ICE-lite connections in both the controlling and controlled roles, but it did not correctly handle pair selection with multiple candidates #959 and #961
ICE-lite agents do not send connectivity checks, so the previously selected pair could remain selected even when a better candidate pair became available later. ICE-lite behavior is defined across several sections of RFC 8445, particularly Section 6.2. Candidate priority uniqueness is required by Section 5.1.2.
This change assigns unique priorities to locally gathered ICE-lite candidates and re-evaluates the standard ICE pair-priority ordering as candidates arrive. Both peers can select the same best pair and switch when a higher-priority pair becomes available, without sending connectivity checks.

Tldr: this fixes a race where both agents select different candidates because of the lack of connectivity checks.

@JoTurk
JoTurk requested a review from Sean-Der September 2, 2026 17:11
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.64286% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.09%. Comparing base (995396d) to head (42c6883).

Files with missing lines Patch % Lines
agent.go 64.44% 11 Missing and 5 partials ⚠️
candidate_base.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #968      +/-   ##
==========================================
- Coverage   88.31%   88.09%   -0.23%     
==========================================
  Files          46       46              
  Lines        6368     6408      +40     
==========================================
+ Hits         5624     5645      +21     
- Misses        510      522      +12     
- Partials      234      241       +7     
Flag Coverage Δ
go 88.09% <69.64%> (-0.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JoTurk
JoTurk force-pushed the jo/finish-lite-lite-selection branch 6 times, most recently from ac110a8 to e927a7b Compare September 3, 2026 00:30
@JoTurk
JoTurk force-pushed the jo/finish-lite-lite-selection branch from e927a7b to 42c6883 Compare September 3, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants