Skip to content

pre-connect the publisher PC when an RPC handler is registered#880

Merged
xianshijing-lk merged 2 commits intomainfrom
sxian/CLT-2540/pre_connection_data_channel_when_rpc_handler_is_created
Feb 10, 2026
Merged

pre-connect the publisher PC when an RPC handler is registered#880
xianshijing-lk merged 2 commits intomainfrom
sxian/CLT-2540/pre_connection_data_channel_when_rpc_handler_is_created

Conversation

@xianshijing-lk
Copy link
Contributor

Problem:

  1. The receiver receives RPC requests through the subscriber data channel (already connected)
  2. When sending the ACK, it uses the publisher data channel
  3. If this is the receiver's first time sending data, the publisher PC hasn't been negotiated yet
  4. ensure_publisher_connected triggers ICE negotiation and polls every 50ms until connected
  5. . ICE negotiation with SFU can take 200-500ms, that adds ~400ms delay

This PR fixes the problem

Copy link
Contributor

@ladvoc ladvoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, great find!

@xianshijing-lk xianshijing-lk merged commit 3019b51 into main Feb 10, 2026
23 of 24 checks passed
@xianshijing-lk xianshijing-lk deleted the sxian/CLT-2540/pre_connection_data_channel_when_rpc_handler_is_created branch February 10, 2026 16:46
This was referenced Feb 10, 2026
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.

3 participants

Comments