move router room manager link (#103)

This commit is contained in:
David Colburn
2021-08-30 17:18:18 -05:00
committed by GitHub
parent 397c5607a9
commit 0bfd05c3b8
2 changed files with 7 additions and 6 deletions
+7 -2
View File
@@ -45,7 +45,7 @@ func NewLocalRoomManager(rp RoomStore, router routing.Router, currentNode routin
return nil, err
}
return &LocalRoomManager{
r := &LocalRoomManager{
RoomStore: rp,
lock: sync.RWMutex{},
rtcConfig: rtcConf,
@@ -56,7 +56,12 @@ func NewLocalRoomManager(rp RoomStore, router routing.Router, currentNode routin
currentNode: currentNode,
webhookPool: workerpool.New(1),
rooms: make(map[string]*rtc.Room),
}, nil
}
// hook up to router
router.OnNewParticipantRTC(r.StartSession)
router.OnRTCMessage(r.handleRTCMessage)
return r, nil
}
// CreateRoom creates a new room from a request and allocates it to a node to handle
-4
View File
@@ -93,10 +93,6 @@ func NewLivekitServer(conf *config.Config,
}
}
// hook up router to the RoomManager
router.OnNewParticipantRTC(roomManager.StartSession)
router.OnRTCMessage(roomManager.handleRTCMessage)
// clean up old rooms on startup
if err = roomManager.CleanupRooms(); err != nil {
return