File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ impl ControllerActor {
103103 offer : String ,
104104 ) -> Result < String , ControllerError > {
105105 let offer = SdpOffer :: from_sdp_string ( & offer) ?;
106- tracing:: info !( "{offer}" ) ;
106+ tracing:: debug !( "{offer}" ) ;
107107 let mut rtc_config = RtcConfig :: new ( )
108108 . clear_codecs ( )
109109 // TODO: enable bwe
@@ -151,7 +151,7 @@ impl ControllerActor {
151151 . await
152152 . map_err ( |_| ControllerError :: ServiceUnavailable ) ?;
153153
154- tracing:: info !( "{answer}" ) ;
154+ tracing:: debug !( "{answer}" ) ;
155155 Ok ( answer. to_sdp_string ( ) )
156156 }
157157
Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ impl actor::Actor for ParticipantActor {
161161 self . handle_published_tracks ( ctx, tracks. as_ref ( ) ) ;
162162 }
163163 ParticipantControlMessage :: TracksUnpublished ( track_ids) => {
164+ tracing:: info!( "tracks unpublished: {track_ids:?}" ) ;
164165 for track_id in track_ids. keys ( ) {
165166 let track = if let Some ( track) =
166167 self . available_video_tracks . remove ( & track_id. internal )
Original file line number Diff line number Diff line change @@ -181,8 +181,13 @@ impl RoomActor {
181181 return ;
182182 } ;
183183
184- for track_id in participant. tracks . keys ( ) {
184+ // Explicitly terminate the tracks owned by the leaving participant.
185+ // This prevents "zombie" track actors from causing race conditions if the participant rejoins quickly.
186+ for ( track_id, track_handle) in & participant. tracks {
187+ // Remove the track from the central registry.
185188 self . state . tracks . remove ( track_id) ;
189+ // Terminate the track actor itself.
190+ let _ = track_handle. terminate ( ) . await ;
186191 }
187192
188193 self . system_ctx
You can’t perform that action at this time.
0 commit comments