Two places decided that a local publication had lost its capture and sent Unpublish. The session's look at each snapshot spared a screen with a pending capture request; the handling of a capture's end did not, and did not look at the publication's kind either. RoomTurns::retire_orphan_publications is the rule once: a local screen is unpublished only when the peer driver reports no running producer for it and the session holds no pending capture request for its id. An end names the ids to check; a snapshot checks every local screen. The difference was a defect. An external source stops while its screen is still published. Before Native handles the queued end, it accepts a new offer for the same publication, records the pending request and enters the room; the replacement's producer starts only after the room answers. Handling the old end then found no producer and unpublished: the sharer saw the screen go during a reconnection and the room cleared the viewers' selections. The pending request now keeps the publication through that interval. An end that named a local voice publication could also remove it; only screens are considered now. await_peer becomes a method of the live session so that the pending requests reach the rule from every place that waits on the driver. Test: capture_end_and_snapshot_preserve_a_pending_screen checks the exact commands for a pending replacement, a local voice publication, a remote screen and an orphan in another room, and that the screen is retired by the next snapshot once the pending caller has gone.
65b65316bd
·
2026-11-29 20:14:09 +08:00
History