WebRTC remote closure notification

When the browser closes a WebRTC connection using RTCPeerConnection.close(), the first we seem to hear of it is a bus error like this

BUS ERROR from /GstPipeline:pipeline-101285809834361/GstWebRTCBin:webrtcbin0/GstSctpEnc:sctpenc0 - Could not write to resource.
  ../subprojects/gst-plugins-bad/ext/sctp/gstsctpenc.c(897): on_sctp_association_state_changed (): /GstPipeline:pipeline-101285809834361/GstWebRTCBin:webrtcbin0/GstSctpEnc:sctpenc0:
SCTP association went into error state

… which feels a bit rougher than it should be.

Is there a way to be notified of disconnection before the error?

(The notify::connection-state signal does not get fired AFAICT)

This seems like a bug, can you report that in GitLab together with a full debug log, or even better a testcase to directly reproduce the problem?

At least there shouldn’t be an actual error message when this happens, but also you should get a proper notification about the connection being closed in one way or another. Without a datachannel I remember this working a while ago, can you confirm that?

Reported and tracked here: WebRTC bus error on closure by remote peer (#3018) · Issues · GStreamer / gstreamer · GitLab

1 Like