Refactor/cleanup of negotiation path

This commit is contained in:
David Zhao
2021-04-15 17:03:22 -07:00
parent 6c5bd4ce42
commit e4238890ff
20 changed files with 153 additions and 151 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ type MessageSink interface {
//counterfeiter:generate . MessageSource
type MessageSource interface {
// source exposes a one way channel to make it easier to use with select
// ReadChan exposes a one way channel to make it easier to use with select
ReadChan() <-chan proto.Message
}
+3 -3
View File
@@ -128,7 +128,7 @@ func (r *RedisRouter) ListNodes() ([]*livekit.Node, error) {
return nodes, nil
}
// signal connection sets up paths to the RTC node, and starts to route messages to that message queue
// StartParticipantSignal signal connection sets up paths to the RTC node, and starts to route messages to that message queue
func (r *RedisRouter) StartParticipantSignal(roomName string, pi ParticipantInit) (connectionId string, reqSink MessageSink, resSource MessageSource, err error) {
// find the node where the room is hosted at
rtcNode, err := r.GetNodeForRoom(roomName)
@@ -248,8 +248,8 @@ func (r *RedisRouter) Stop() {
return
}
logger.Debugw("stopping RedisRouter")
r.pubsub.Close()
r.UnregisterNode()
_ = r.pubsub.Close()
_ = r.UnregisterNode()
r.cancel()
}