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: close webrtc streams #2074

Merged
merged 11 commits into from
Oct 5, 2023

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Sep 23, 2023

Chrome does not always send all messages after closing a datachannel even if bufferedAmount is 0 before closing.

This PR adds a FIN_ACK message that is sent in reply to a FIN message - because all messages are send in-order, when this is received we know the remote has recieved all of our data messages and it's safe to close the channel.

Chrome does not always send all messages after closing a datachannel
even if `bufferedAmount` is `0` before closing.

This PR adds a `FIN_ACK` message that is sent in reply to a `FIN`
message - because all messages are send in-order, when this is
received we know the remote has recieved all of our data messages
and it's safe to close the channel.
@achingbrain achingbrain requested a review from a team as a code owner September 23, 2023 19:28
@achingbrain
Copy link
Member Author

The spec changes have been merged so I'm going to merge this into the other WebRTC PR so we can land both together.

@achingbrain achingbrain merged commit ac92ec7 into fix/webrtc-stream-closing Oct 5, 2023
18 checks passed
@achingbrain achingbrain deleted the fix/add-webrtc-fin-ack branch October 5, 2023 08:22
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.

1 participant