mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-02 17:53:48 +00:00
webrtcsink: fix deadlock on error setting remote description
Avoids another attempt to lock the sesion mutex recursively. Take a copy of the session id string to be passed to the signaller and drop the session mutex after removal of session from the hashmap Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2331>
This commit is contained in:
parent
f835e075ea
commit
fc0b433e29
1 changed files with 3 additions and 1 deletions
|
@ -3767,12 +3767,14 @@ impl BaseWebRTCSink {
|
|||
|
||||
if remove {
|
||||
let _ = state.sessions.remove(&session.id);
|
||||
let session_id = session.id.clone();
|
||||
drop(session);
|
||||
state.finalize_session(&self.obj(), Session(session_clone.clone()));
|
||||
drop(state_guard);
|
||||
let settings = self.settings.lock().unwrap();
|
||||
let signaller = settings.signaller.clone();
|
||||
drop(settings);
|
||||
signaller.end_session(&session.id);
|
||||
signaller.end_session(&session_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue