PSA: DataChannel closing procedure changing

248 views
Skip to first unread message

Taylor Brandstetter

unread,
Jun 5, 2018, 1:09:16 PM6/5/18
to discuss-webrtc
This CL changes the DataChannel closing procedure to match the standard. As a result, if you close a DataChannel from a new version of WebRTC, and the other endpoint is using an old version, it will be stuck in the "closing" state. This is already what happens if you close a DataChannel from Firefox and the other side is Chrome (as Firefox is already doing the correct procedure). But if this is a problem, let us know and we can consider ways to mitigate it.

This change will hit M69, and can be tested in a Canary build today.

For those who are interested...

The correct procedure is:
  1. Alice resets outgoing stream.
  2. Bob sees incoming stream reset, resets his outgoing stream.
  3. For each side, after both outgoing/incoming streams are reset, state changes from "closing" to "closed".
But instead, we've been doing:
  1. Alice resets outgoing stream *and* incoming stream, and immediately sets state to "closed" (even before acknowledgement is received).
  2. Bob sees incoming stream reset, sets state to "closed".
As a result, if Alice is a standards-compliant endpoint and Bob isn't, Bob won't reset his outgoing stream, and Alice will keep waiting for that indefinitely. Hence the highlighted issue.


Lennart Grahl

unread,
Jun 5, 2018, 3:04:30 PM6/5/18
to discuss-webrtc
Thanks for fixing this. :)

Feross Aboukhadijeh

unread,
Jun 12, 2018, 1:43:48 PM6/12/18
to discuss...@googlegroups.com
Thanks!

Feross
 
I write at feross.org and tweet as @feross.
I work on WebTorrentStandard, and Study Notes.


--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/473f137a-d383-44d9-bc9b-99bb5ef7cd31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages