Ensure older session does not clobeer newer session. (#1974)

This commit is contained in:
Raja Subramanian
2023-08-18 02:00:43 +05:30
committed by GitHub
parent 129b1df8e6
commit 1a32439d7e
2 changed files with 10 additions and 2 deletions
+9
View File
@@ -1069,6 +1069,15 @@ func (r *Room) pushAndDequeueUpdates(pi *livekit.ParticipantInfo, isImmediate bo
return nil
}
}
} else {
ep := r.GetParticipant(identity)
if ep != nil {
epi := ep.ToProto()
if epi.JoinedAt > pi.JoinedAt {
// older session update, newer session has already become active, so nothing to do
return nil
}
}
}
if shouldSend {