webrtc Flag not being transferred
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.6k
- Forks
- 1.3k
- Avg merge
- 8h 47m
- Merged PRs (30d)
- 19
Description
Summary
When a webrtc stream is closed, a Flag::FIN is sent, but the remote never gets the flag. Same with Flag::RESET, it's never received by the remote peer.
In fact, I don't see any Flags being received.
This results in a webrtc-utils stream being closed on one end, but left to timeout on the other end.
Specifically this is a problem right after handshake, where the noise DataChannel is left to timeout after 10 seconds, then a new data channel is established and streams can flow.
The impact is that WebRtc can only be used after this 10 second timeout until the new datachannel is made to replace the closed one.
Expected behavior
It's expected that when
is called, that the remote received the Flag
Actual behavior
No inbound Flag (FIN, RESET) appears to be received by the remote. In fact, this code never seems to be called:
Relevant log output
Possible Solution
I can't tell why the FIN and RESET flags are not being received. The code looks like it should work fine, yet we have an absence of these Flags.
Version
0.54.1
Would you like to work on fixing this bug?
I'll try
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in misc/webrtc-utils/src/stream.rs at lines 228-231 and inspect misc/webrtc-utils/src/stream/state.rs at lines 59-81, then reproduce the post-handshake stream-close case. Trace why FIN and RESET do not reach the remote peer; done means inbound flags are observed and the noise DataChannel no longer waits for the 10-second timeout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- audio-video-rtc, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100