From 3f9cf6bfc293403b816d1d3744072102c603d739 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Thu, 6 Aug 2026 00:59:37 +0530 Subject: [PATCH] Do not report end time for participant if the participant is migrating (#4728) out. --- pkg/rtc/participant.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/rtc/participant.go b/pkg/rtc/participant.go index d6b4125a..8a8f0a76 100644 --- a/pkg/rtc/participant.go +++ b/pkg/rtc/participant.go @@ -418,8 +418,10 @@ func NewParticipant(params ParticipantParams) (*ParticipantImpl, error) { var timerStarted bool params.Reporter.RegisterFunc(func(ts time.Time, tx roomobs.ParticipantSessionTx) bool { if dts := p.disconnectedAt.Load(); dts != nil { - ts = *dts - tx.ReportEndTime(ts) + if p.CloseReason() != types.ParticipantCloseReasonMigrationComplete { // participant has migrated to another node + ts = *dts + tx.ReportEndTime(ts) + } } // Don't publish duration if participant never became active. Otherwise short-lived