-
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
Close other peer's dtls & datachannel after unload #2490
Comments
On second thought, it might be useful to only shut down the transport objects, to leave the door open to bfcaching a peer connection. @youennf thoughts? |
Related to w3c/webrtc-extensions#200. I do not see why we are special casing data channel here. I am not exactly sure what you mean by shutting down the transport objects. If we simulate a network error or a freeze of the whole process doing networking, we would probably end up going in disconnected or failed ICE transport state after some time spent in the b/f cache (except the page will only be notified of those changes if resurrected from the b/f cache). If we just go back and forth (like I wrongly navigated and went back), the connection would probably remain the same. |
Happy to include dtls if it helps the discussion, as long as we're specific.
That's one way (through "close_notify alert"), the other being reception of SCTP ABORT. The pc.close algorithm mentions "sending an SCTP ABORT chunk", so I'm not 100% sure which one gets the credit. Regardless, they're intentional termination signals. But how terminal are they to our objects?
I think we're talking about closing the SctpTransport ( In contrast, stopping a transceiver is a negotiated property (without negotiation it sends RTCP BYE which merely mutes the remote track).
Then we'd need to avoid all terminal steps in the pc.close algorithm. It's a bit unclear to me what those are, but I fear it's most of them. |
Seems like we have a simpler world if page.onunload() triggers pc.close() automatically. Recovery is complicated, and we have had no use cases where recovery is helpful. Things may be different in webrtc-nv. |
Conclusion: Close pc on page unload. |
To be addressed by PR in #2516 |
From #2489 (comment) it appears Firefox & Chrome 82 close other peer's datachannels after unload.
This covers closing a tab/window, navigation and reload. This seems useful to specify.
It would probably suffice to run (part of) the close algorithm on all peer-connections on the page, including iframes, on tear-down (this is what Firefox does).
The text was updated successfully, but these errors were encountered: