On shutdown, a previous iteration of dtsl_connection_process()
might be incomplete and leave a partial bio_buffer behind.
If the DTLS connection is already marked closed, drop out
of dtls_connection_process early without asserting.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1741>
g_mutex_lock (&priv->mutex);
GST_TRACE_OBJECT (self, "locked @ process");
- g_warn_if_fail (!priv->bio_buffer);
-
- if (self->priv->received_close_notify) {
+ if (self->priv->received_close_notify
+ || self->priv->connection_state == GST_DTLS_CONNECTION_STATE_CLOSED) {
GST_DEBUG_OBJECT (self, "Already received close_notify");
g_mutex_unlock (&priv->mutex);
return GST_FLOW_EOS;
return GST_FLOW_ERROR;
}
+ g_warn_if_fail (!priv->bio_buffer);
+
priv->bio_buffer = data;
priv->bio_buffer_len = len;
priv->bio_buffer_offset = 0;