Revert "Cache data synchronously for processing in worker." (#2425)

This commit is contained in:
Raja Subramanian
2024-01-29 12:36:27 +05:30
committed by GitHub
parent 0be241eed8
commit 846121e781
3 changed files with 37 additions and 57 deletions
+4 -4
View File
@@ -577,10 +577,10 @@ func (r *RoomManager) getOrCreateRoom(ctx context.Context, roomName livekit.Room
}
})
newRoom.OnParticipantChanged(func(p types.LocalParticipant, pi *livekit.ParticipantInfo) {
if pi.State != livekit.ParticipantInfo_DISCONNECTED {
if err := r.roomStore.StoreParticipant(ctx, roomName, pi); err != nil {
p.GetLogger().Errorw("could not handle participant change", err)
newRoom.OnParticipantChanged(func(p types.LocalParticipant) {
if !p.IsDisconnected() {
if err := r.roomStore.StoreParticipant(ctx, roomName, p.ToProto()); err != nil {
newRoom.Logger.Errorw("could not handle participant change", err)
}
}
})