driveby cleanup (#3017)

* driveby cleanup

* test
This commit is contained in:
Paul Wells
2024-09-18 00:45:55 -07:00
committed by GitHub
parent f21bc84967
commit 1436a1f186
7 changed files with 9 additions and 30 deletions
+1
View File
@@ -603,6 +603,7 @@ func (r *RoomManager) getOrCreateRoom(ctx context.Context, createRoom *livekit.C
agentDispatchServer := must.Get(rpc.NewTypedAgentDispatchInternalServer(r, r.bus))
killDispServer := r.agentDispatchServers.Replace(roomTopic, agentDispatchServer)
if err := agentDispatchServer.RegisterAllRoomTopics(roomTopic); err != nil {
killRoomServer()
killDispServer()
r.lock.Unlock()
return nil, err