Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(data-channel): stuck closing in Chrome #480

Merged
merged 2 commits into from
Aug 24, 2023

Conversation

Marcel-G
Copy link
Contributor

@Marcel-G Marcel-G commented Aug 15, 2023

Resolves #468

Currently the library does not properly implement the shutdown procedure for data channels closed by Chrome. In order for the data channel to fully close, it must receive a OutgoingResetRequest.

This was an existing issue in pion which has since been resolved here pion/sctp#238

Reproduction

Using the examples/data-channels
Run the JS test for closing data channels: jsfiddle
Note the RTCDataChannels never enter closed state.

@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Patch coverage: 62.50% and project coverage change: -0.02% ⚠️

Comparison is base (2f7df93) 61.80% compared to head (3b5f1fa) 61.79%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #480      +/-   ##
==========================================
- Coverage   61.80%   61.79%   -0.02%     
==========================================
  Files         530      530              
  Lines       48858    48860       +2     
  Branches    12324    12326       +2     
==========================================
- Hits        30199    30194       -5     
- Misses       9499     9502       +3     
- Partials     9160     9164       +4     
Files Changed Coverage Δ
examples/examples/data-channels/data-channels.rs 0.00% <0.00%> (ø)
webrtc/src/data_channel/data_channel_test.rs 61.00% <0.00%> (ø)
interceptor/src/twcc/receiver/receiver_test.rs 70.31% <100.00%> (ø)
media/src/audio/buffer/info.rs 76.19% <100.00%> (-2.08%) ⬇️
sctp/src/queue/queue_test.rs 65.00% <100.00%> (ø)
sctp/src/timer/timer_test.rs 60.26% <100.00%> (ø)
sdp/src/direction/direction_test.rs 87.50% <100.00%> (ø)
sdp/src/extmap/extmap_test.rs 77.77% <100.00%> (ø)
util/src/vnet/router/router_test.rs 60.70% <100.00%> (-0.19%) ⬇️

... and 5 files with indirect coverage changes

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

@Marcel-G
Copy link
Contributor Author

@mxinden this remaining issues something you can help with?

@rainliu
Copy link
Member

rainliu commented Aug 24, 2023

should we port the fix from webrtc-rs/sctp-proto#6 to here?

@Marcel-G Marcel-G force-pushed the issue-468/fix-dc-close-2 branch 2 times, most recently from 8e9864c to c6660bf Compare August 24, 2023 07:49
@Marcel-G
Copy link
Contributor Author

@rainliu yes, works like a charm!

@Marcel-G Marcel-G force-pushed the issue-468/fix-dc-close-2 branch from c6660bf to 78b0a0d Compare August 24, 2023 07:51
@Marcel-G Marcel-G force-pushed the issue-468/fix-dc-close-2 branch from 78b0a0d to c257866 Compare August 24, 2023 07:54
@rainliu
Copy link
Member

rainliu commented Aug 24, 2023

Great. Could you please fix format/clippy warning?

@rainliu
Copy link
Member

rainliu commented Aug 24, 2023

Still clippy errors.Make sure you are using same or above cargo version in the GitHub actions.

@Marcel-G Marcel-G force-pushed the issue-468/fix-dc-close-2 branch 2 times, most recently from 38f5367 to 417ab7e Compare August 24, 2023 18:07
@Marcel-G Marcel-G force-pushed the issue-468/fix-dc-close-2 branch from 417ab7e to 3b5f1fa Compare August 24, 2023 18:09
@rainliu rainliu merged commit 73ce2b8 into webrtc-rs:master Aug 24, 2023
@Marcel-G Marcel-G deleted the issue-468/fix-dc-close-2 branch August 24, 2023 20:07
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.

RTCDataChannel not properly closed
2 participants