mirror of
https://github.com/livekit/livekit.git
synced 2026-09-29 02:28:26 +00:00
* rtc: record a room's departure when the participant leaves it RemoveParticipant removed the participant from the room, closed it, and only then recorded leftAt. CloseIfEmpty runs every second, so a tick landing during the close saw an empty room with a stale or zero departure time and closed it at once: with no departure recorded it compares against the room's creation time and empty_timeout, and with an earlier departure it measures the grace period from that older timestamp. Either way departure_timeout is skipped. Record the departure where the participant is removed, under the lock that already covers it. * rtc: drop the removal wait from the departure timeout test The close signal already pins the interleaving, and the room's close state is decided by the CloseIfEmpty call itself.