mirror of
https://github.com/livekit/livekit.git
synced 2026-06-06 19:51:52 +00:00
rtc: report participant session end time on room move (#4561)
MoveToRoom resets the participant reporter resolver to receive new (room, participant_session) keys for the destination, but the source room's participant_session row never gets an end_time — the periodic duration scrape only emits one once disconnectedAt is set, and a move doesn't transition the participant to DISCONNECTED. Report end_time immediately before the reset so the row is closed out cleanly.
This commit is contained in:
@@ -4069,6 +4069,7 @@ func (p *ParticipantImpl) MoveToRoom(params types.MoveToRoomParams) {
|
||||
p.telemetryGuard = &telemetry.ReferenceGuard{}
|
||||
p.lock.Unlock()
|
||||
|
||||
p.params.Reporter.ReportEndTime(time.Now())
|
||||
p.params.LoggerResolver.Reset()
|
||||
p.params.ReporterResolver.Reset()
|
||||
p.setListener(params.Listener)
|
||||
|
||||
Reference in New Issue
Block a user