Do not report end time for participant if the participant is migrating (#4728)
out.
This commit is contained in:
@@ -418,8 +418,10 @@ func NewParticipant(params ParticipantParams) (*ParticipantImpl, error) {
|
|||||||
var timerStarted bool
|
var timerStarted bool
|
||||||
params.Reporter.RegisterFunc(func(ts time.Time, tx roomobs.ParticipantSessionTx) bool {
|
params.Reporter.RegisterFunc(func(ts time.Time, tx roomobs.ParticipantSessionTx) bool {
|
||||||
if dts := p.disconnectedAt.Load(); dts != nil {
|
if dts := p.disconnectedAt.Load(); dts != nil {
|
||||||
ts = *dts
|
if p.CloseReason() != types.ParticipantCloseReasonMigrationComplete { // participant has migrated to another node
|
||||||
tx.ReportEndTime(ts)
|
ts = *dts
|
||||||
|
tx.ReportEndTime(ts)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't publish duration if participant never became active. Otherwise short-lived
|
// Don't publish duration if participant never became active. Otherwise short-lived
|
||||||
|
|||||||
Reference in New Issue
Block a user