webrtc
webrtc copied to clipboard
PeerConnection should support shutdown on DTLS Close
Your environment.
- Version: v2.2.26
- Browser: firefox 88.0b8
What did you do?
I'm calling the PeerConnection.Close
function.
What did you expect?
The connection should be closed, and I should see the connection on the remote peer being disconnected.
What happened?
The connection on the remote peer does not go to disconnected state instantly. It does after the SettingsEngine.tiemout.ICEConnection
timeouts (which is 30 seconds by default).
I'm perhaps missing something here since I'm fairly new to the webrtc field.
deer friends closepeer function not remote the peer message , you need remote message tell this peer let peer user close you connect to
Hey @EmrysMyrddin thanks for checking out Pion :)
With WebRTC you can't depend on a graceful hangup. Everything is over UDP, and the other side can just stop sending/accepting packets.
I would depend on ICEConnectionState
which will timeout. People also communicate quicker hangups via their signaling server.
WebRTC does have some facilities for faster hangup though. We don't support any of them today (but we should!) I will leave the ticket open and we can address in the future. I wouldn't depend on these though. WebRTC clients don't have to send them, and they only work if you have no packet loss and a graceful shutdown.
- DTLS Close
- SCTP Shutdown
- RTCP Bye
@Sean-Der Hi! I'm very interested in this issue as I've had multiple reports against aiortc
wishing for faster detection of the remote peer disconnecting. Where do the specs say that a peer connection should be torn down when DTLS is closed?