File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -208,14 +208,13 @@ def add_track_subscriber(
208208 """Add a new subscriber to an existing track's MediaRelay."""
209209 track_data = self .track_map .get (track_id )
210210
211- blackhole , drain_task , drain_proxy = self ._video_drains .pop (
212- track_id , (None , None , None )
213- )
211+ video_drain = self ._video_drains .pop (track_id , None )
214212
215- if blackhole and drain_task and drain_proxy :
213+ if video_drain is not None :
214+ blackhole , drain_task , drain_proxy = video_drain
216215 task = asyncio .create_task (blackhole .stop ())
217216 drain_proxy .stop ()
218- drain_task .cancel () # safety net if start() becomes long-lived in future aiortc
217+ drain_task .cancel ()
219218 self ._background_tasks .add (task )
220219 task .add_done_callback (self ._background_tasks .discard )
221220
You can’t perform that action at this time.
0 commit comments