fixed multi-node so signal node can start sessions
This commit is contained in:
@@ -6,7 +6,6 @@ var (
|
||||
ErrNotFound = errors.New("could not find object")
|
||||
ErrHandlerNotDefined = errors.New("handler not defined")
|
||||
ErrNoAvailableNodes = errors.New("could not find any available nodes")
|
||||
ErrIncorrectNodeForRoom = errors.New("incorrect node for the current room")
|
||||
errInvalidRouterMessage = errors.New("invalid router message")
|
||||
ErrChannelClosed = errors.New("channel closed")
|
||||
)
|
||||
|
||||
@@ -161,12 +161,7 @@ func (r *RedisRouter) StartParticipant(roomName, participantId, participantName
|
||||
return err
|
||||
}
|
||||
|
||||
// StartParticipant should only be called on the current node
|
||||
if rtcNode != r.currentNode.Id {
|
||||
return ErrIncorrectNodeForRoom
|
||||
}
|
||||
|
||||
if r.useLocal {
|
||||
if r.useLocal && rtcNode == r.currentNode.Id {
|
||||
return r.LocalRouter.StartParticipant(roomName, participantId, participantId)
|
||||
}
|
||||
|
||||
@@ -282,7 +277,6 @@ func (r *RedisRouter) subscribeWorker() {
|
||||
continue
|
||||
}
|
||||
|
||||
logger.Debugw("received redis message", "message", msg, "node", r.currentNode.Id)
|
||||
rm := livekit.RouterMessage{}
|
||||
err = proto.Unmarshal([]byte(msg.Payload), &rm)
|
||||
pId := rm.ParticipantId
|
||||
|
||||
Reference in New Issue
Block a user