empty_timeout and
departure_timeout in livekit-agents control different phases of a room's lifecycle:
•
empty_timeout: Determines how long a newly created room will remain open if no participants join. If the room stays empty for this duration, it will be closed automatically. Default is typically 300 seconds (5 minutes).
•
departure_timeout: Determines how long the room will remain open after the last participant leaves. This allows for quick reconnections or late joiners before the room is closed. Default is typically 20 seconds.
Both settings are configurable and help manage server resources by cleaning up unused rooms at the appropriate times.
Sources:
livekit-protocol/src/livekit.rs |
livekit-rtc/livekit/rtc/room.py |
pkg/config/config.go |
cmd/lk/room.go