Skip to content

fix(rice-proto): forward TCP AllocateSocket to checklist after gathering#167

Merged
ystreet merged 3 commits into
ystreet:mainfrom
ShaJaPas:fix/tcp-allocated-socket-after-gather
Jul 1, 2026
Merged

fix(rice-proto): forward TCP AllocateSocket to checklist after gathering#167
ystreet merged 3 commits into
ystreet:mainfrom
ShaJaPas:fix/tcp-allocated-socket-after-gather

Conversation

@ShaJaPas

Copy link
Copy Markdown
Contributor

Summary

  • Fix StreamMut::allocated_socket so connectivity-check AllocateSocket requests reach the checklist after local gathering has finished (RFC 6544 TCP ICE).
  • Add unit test allocated_socket_reaches_checklist_after_gathering that reproduces the hang without the fix.

Test plan

  • cargo test -p rice-proto --no-default-features --features std,rustls allocated_socket_reaches_checklist_after_gathering

Always notify checklistset once gathering is complete; add unit test.
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.35%. Comparing base (87c2e94) to head (bbfc1b4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #167      +/-   ##
==========================================
+ Coverage   86.22%   86.35%   +0.12%     
==========================================
  Files          38       38              
  Lines        6681     6678       -3     
==========================================
+ Hits         5761     5767       +6     
+ Misses        920      911       -9     

☔ 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.

@ystreet

ystreet commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR. LGTM once the style and clippy issues are fixed.

@ystreet

ystreet commented Jul 1, 2026

Copy link
Copy Markdown
Owner

clippy is not happy :)

libturn_client_rustls-511e093895477c44.rmeta -L native=/home/runner/work/librice/librice/target/debug/build/aws-lc-sys-31a39d28b72ae5b8/out -L native=/home/runner/work/librice/librice/target/debug/build/ring-e128f643502bc982/out`
error: this loop could be written as a `while let` loop
    --> rice-proto/src/conncheck.rs:2547:17
     |
2547 | /                 loop {
2548 | |                     let Some(data) = tcp_buffer.pull_data() else {
2549 | |                         break;
2550 | |                     };
...    |
2583 | |                         .unwrap();
2584 | |                 }
     | |_________________^ help: try: `while let Some(data) = tcp_buffer.pull_data() { .. }`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#while_let_loop
     = note: `-D clippy::while-let-loop` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(clippy::while_let_loop)]`

@ShaJaPas

ShaJaPas commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@ystreet I've checked locally, all check now should pass :)

@ystreet ystreet merged commit 526a34b into ystreet:main Jul 1, 2026
14 checks passed
@ShaJaPas ShaJaPas deleted the fix/tcp-allocated-socket-after-gather branch July 1, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants