-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
add Abort function to sctptransport #2900
base: master
Are you sure you want to change the base?
Conversation
the association should send the abort message before closing the association as defined by the wbertc spec in step 6 https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close
This change is correct, but we probably also need to ensure that we don't send the DTLS Close Alert on connection close. We do that currently. This is an annoying aspect of the spec. The way to detect peer connection close is by opening a datachannel that will be closed on close of the peer connection. See here: If you're not using it from the browser, you can use the Line 303 in 179397b
|
If I understand correctly, we should replace the close Notify by the abort message It is kind of a big behavior change, on how the peerConnection notify the other party of the close but abort should be the way to go as it is the standard and we can expect this behavior everywhere else Currently the Close of the conn.go in Dtls always send the bool byUser to true to the private close if c.isHandshakeCompletedSuccessfully() && byUser {
// Discard error from notify() to return non-error on the first user call of Close()
// even if the underlying connection is already closed.
_ = c.notify(context.Background(), alert.Warning, alert.CloseNotify)
} or give access to the bool in the public Close and rename it for notifyClose instead of byUser I did not have any issue by having both the abort and notifyClose in my tests |
Description
the association should send the abort message before before changing the state to closed and closing the association as defined by the webrtc spec in step 6
https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close
When the peerConnection is closed without sending an abort message, it cause the other peer to hang on it's connection until it face a timeout or other kind of event showing that the connection is closed
This can be an issue with device who can only do a few concurrent stream
This was tested with real cameras and instead of the connection hanging for 30 seconds, it closed immediately