DeleteRoom now removes all participants in the room
This commit is contained in:
@@ -7,6 +7,7 @@ var (
|
||||
ErrHandlerNotDefined = errors.New("handler not defined")
|
||||
ErrNoAvailableNodes = errors.New("could not find any available nodes")
|
||||
ErrIncorrectRTCNode = errors.New("current node isn't the RTC node for the room")
|
||||
ErrNodeNotFound = errors.New("could not locate the node")
|
||||
errInvalidRouterMessage = errors.New("invalid router message")
|
||||
ErrChannelClosed = errors.New("channel closed")
|
||||
ErrChannelFull = errors.New("channel is full")
|
||||
|
||||
@@ -273,11 +273,19 @@ func (r *RedisRouter) setParticipantSignalNode(connectionId, nodeId string) erro
|
||||
}
|
||||
|
||||
func (r *RedisRouter) getParticipantRTCNode(participantKey string) (string, error) {
|
||||
return r.rc.Get(r.ctx, participantRTCKey(participantKey)).Result()
|
||||
val, err := r.rc.Get(r.ctx, participantRTCKey(participantKey)).Result()
|
||||
if err == redis.Nil {
|
||||
err = ErrNodeNotFound
|
||||
}
|
||||
return val, err
|
||||
}
|
||||
|
||||
func (r *RedisRouter) getParticipantSignalNode(connectionId string) (nodeId string, err error) {
|
||||
return r.rc.Get(r.ctx, participantSignalKey(connectionId)).Result()
|
||||
val, err := r.rc.Get(r.ctx, participantSignalKey(connectionId)).Result()
|
||||
if err == redis.Nil {
|
||||
err = ErrNodeNotFound
|
||||
}
|
||||
return val, err
|
||||
}
|
||||
|
||||
// update node stats and cleanup
|
||||
|
||||
Reference in New Issue
Block a user