mirror of
https://github.com/livekit/livekit.git
synced 2026-03-29 11:29:52 +00:00
On a resume, the signal stats will call `ParticipantLeft`. Although, it explicity says not to send events, it could still close the stats worker. To handle that, we created a stats worker if needed in `ParticipantResume` notification in this PR (https://github.com/livekit/livekit/pull/2982), but that is not enough as that event could happen before previous signal connection closes the stats worker. A new stats worker does get created when `ParticipantJoined` is called by the new signal connection, but it does not transfer connected state. So, when the client leaves, `ParticipantLeft` is not sent. I am not seeing why we should not transfer connected state always given that it is the same participant SID/session. But, I have a feeling that I am missing some corner case. Please let me know if I am missing something here.