Do not report end time for participant if the participant is migrating (#4728)

out.
This commit is contained in:
Raja Subramanian
2026-08-06 00:59:37 +05:30
committed by GitHub
parent 52ef3cd649
commit 3f9cf6bfc2
+4 -2
View File
@@ -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