-
Notifications
You must be signed in to change notification settings - Fork 114
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
RTCDataChannel.send during 'closing' state #1827
Comments
Can you submit a PR? |
As an alternative: What if we simply say to discard the message passed to the |
Adding an |
@lgrahl Looking at RFC 6525 and Section 6.7 of draft-ietf-rtcweb-data-channel, one way to handle this would be to have receipt of an incoming stream reset cause "6.7. Closing a Data Channel Closing of a data channel MUST be signaled by resetting the [RFC6525] also guarantees that all the messages are delivered (or |
That would probably resolve the issue with |
@aboba or @lgrahl Excuse me if I'm misinterpreting this, but how would this procedure work for a hard-quit peer, i.e. a browser peer that has been forced to quit and so does not send any reset or anything? I am still stuck in a To elaborate: I have two connected peers, they share a RTCPeerConnection and a DataChannel. The other peer then force-quits their browser. I receive |
@jhaenchen There's no need for cleanup in that case. I was going to write that:
But I haven't found a procedure in the spec that defines what should happen once the peer connection state goes into Anyhow, even if the procedure is missing, there is no need to do cleanup and the data channels should be in the |
@lgrahl Could we fire the |
We discussed that before, see #1827 (comment) (but I also forgot that we had this discussion 😅). It is unknown whether there is any application relying on that mechanism. Another suboptimal alternative would be to say "well, The least breaking would be to add an |
I use the onclose event to discern if I should reinitiate a connection. If a connection fails and the onclose event doesn’t fire, the only way I can tell is to monitor the ice connection state for a particular state which seems more brittle than relying on an event. And it seems that onclose may not fire for user-initiated events either? I’m struggling to understand how best to utilize this event handler. |
@jhaenchen are you still basing observations on Chrome? Do you get different results in Firefox? This sounds like #1020 (comment) again. |
|
@jan-ivar that does seem like the bug I’m experiencing. Didn’t see the comment you referenced either, thanks for bringing that to my attention! |
Outcome of TPAC was to add "onclosing". |
As per October 2018 TPAC decision. Fixes #1827
m |
Let's look at the following scenario: Peer A and B have an
open
data channel. If peer A closes the channel, peer B's channel will go into theclosing
state until all pending messages of both peers have been sent. If peer B calls the.send
method, it will throw an exception since the channel is not in theopen
state any more. But peer B has no way of knowing that unless it polls.readyState
.Do we need to address that with an... (I'm reluctant to say that) event?
The text was updated successfully, but these errors were encountered: