steep-balloon-41261
07/11/2023, 1:01 PMboundless-energy-78552
07/11/2023, 1:58 PMenough-zebra-80131
07/11/2023, 2:17 PMenough-zebra-80131
07/12/2023, 9:20 AMenough-zebra-80131
07/12/2023, 9:20 AMfor (_participant_sid, participant) in room.participants() {
debug!("participant: {:?}", participant);
for (track_sid, publication) in participant.tracks() {
debug!("\ttrack_publication: {} = {:?}", track_sid, publication);
if let Some(remote_publication) = participant.get_track_publication(&track_sid) {
debug!("\tremote_publication: {:?}", remote_publication);
remote_publication.set_subscribed(true).await;
}
}
}
boundless-energy-78552
07/12/2023, 9:21 AMboundless-energy-78552
07/12/2023, 9:21 AMenough-zebra-80131
07/12/2023, 9:21 AMawait
enough-zebra-80131
07/12/2023, 9:21 AMboundless-energy-78552
07/12/2023, 9:22 AMenough-zebra-80131
07/12/2023, 9:22 AMenough-zebra-80131
07/12/2023, 9:22 AMenough-zebra-80131
07/12/2023, 10:05 AMlivekit/src/room/publication/remote.rs::set_subscribed
when holding the info
variable declared on let mut info = <http://self.remote.info|self.remote.info>.write();
it locks a RwLock
that then will block when trying to do the self.emit_subscription_update(old_subscription_state);
below
emit_permission_update
will try to read the self.permission_status()
, which will try to read the self.is_allowed()
, which will attempt to access <http://self.remote.info|self.remote.info>
which will blockenough-zebra-80131
07/12/2023, 10:06 AMinfo
block from set_subscribed
as a scoped variable
pub async fn set_subscribed(&self, subscribed: bool) {
let old_subscription_state = self.subscription_status();
let old_permission_state = self.permission_status();
{
let mut info = self.remote.info.write();
info.subscribed = subscribed;
if subscribed {
info.allowed = true;
}
}
...
enough-zebra-80131
07/12/2023, 10:06 AMenough-zebra-80131
07/12/2023, 10:07 AMRoomEvent
after that - so I guess it's blocking somewhere elseenough-zebra-80131
07/12/2023, 10:11 AMRoomEvent::TrackSubscribed
if the manual subscription succeeds?boundless-energy-78552
07/12/2023, 9:27 PMboundless-energy-78552
07/18/2023, 2:16 PMboundless-energy-78552
07/18/2023, 2:18 PMenough-zebra-80131
07/18/2023, 3:02 PM