Avoid duplicate track add to room track manager. (#4152)
* Avoid duplicate track add to room track manager. Don't have proof that this happens, but in the leak chase, this is another component at room level and holds references to tracks. Guessing this is not cleaning tracks till room is closed. * add a report
This commit is contained in:
+1
-1
@@ -265,7 +265,6 @@ func NewRoom(
|
||||
agentClient: agentClient,
|
||||
agentStore: agentStore,
|
||||
agentDispatches: make(map[string]*agentDispatch),
|
||||
trackManager: NewRoomTrackManager(),
|
||||
serverInfo: serverInfo,
|
||||
participants: make(map[livekit.ParticipantIdentity]types.LocalParticipant),
|
||||
participantOpts: make(map[livekit.ParticipantIdentity]*ParticipantOptions),
|
||||
@@ -284,6 +283,7 @@ func NewRoom(
|
||||
MaxSize: dataMessageCacheSize,
|
||||
}),
|
||||
}
|
||||
r.trackManager = NewRoomTrackManager(r.logger)
|
||||
r.localParticipantListener = &localParticipantListener{room: r}
|
||||
|
||||
if r.protoRoom.EmptyTimeout == 0 {
|
||||
|
||||
Reference in New Issue
Block a user