diff --git a/ext/webrtc/webrtcdatachannel.c b/ext/webrtc/webrtcdatachannel.c index 4305707254..fde12613c8 100644 --- a/ext/webrtc/webrtcdatachannel.c +++ b/ext/webrtc/webrtcdatachannel.c @@ -285,8 +285,10 @@ _transport_closed (WebRTCDataChannel * channel) channel->stored_error = NULL; GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel); - if (error) + if (error) { gst_webrtc_data_channel_on_error (GST_WEBRTC_DATA_CHANNEL (channel), error); + g_clear_error (&error); + } gst_webrtc_data_channel_on_close (GST_WEBRTC_DATA_CHANNEL (channel)); }