Files
livekit/pkg
Martin Njalale 5cd0f37342 rtc: record a room's departure when the participant leaves it (#4913)
* 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.
2026-09-28 14:06:26 +05:30
..
2025-11-28 21:51:53 +05:30