start signal relay sessions with the correct node (#1721)
* start signal relay sessions with the correct node * enable signal relay in multiregion integration test
This commit is contained in:
@@ -210,7 +210,6 @@ type SignalRelayConfig struct {
|
|||||||
MinRetryInterval time.Duration `yaml:"min_retry_interval,omitempty"`
|
MinRetryInterval time.Duration `yaml:"min_retry_interval,omitempty"`
|
||||||
MaxRetryInterval time.Duration `yaml:"max_retry_interval,omitempty"`
|
MaxRetryInterval time.Duration `yaml:"max_retry_interval,omitempty"`
|
||||||
StreamBufferSize int `yaml:"stream_buffer_size,omitempty"`
|
StreamBufferSize int `yaml:"stream_buffer_size,omitempty"`
|
||||||
MinVersion int `yaml:"min_version,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegionConfig lists available regions and their latitude/longitude, so the selector would prefer
|
// RegionConfig lists available regions and their latitude/longitude, so the selector would prefer
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ func (r *LocalRouter) StartParticipantSignal(ctx context.Context, roomName livek
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *LocalRouter) StartParticipantSignalWithNodeID(ctx context.Context, roomName livekit.RoomName, pi ParticipantInit, nodeID livekit.NodeID) (connectionID livekit.ConnectionID, reqSink MessageSink, resSource MessageSource, err error) {
|
func (r *LocalRouter) StartParticipantSignalWithNodeID(ctx context.Context, roomName livekit.RoomName, pi ParticipantInit, nodeID livekit.NodeID) (connectionID livekit.ConnectionID, reqSink MessageSink, resSource MessageSource, err error) {
|
||||||
connectionID, reqSink, resSource, err = r.signalClient.StartParticipantSignal(ctx, roomName, pi, livekit.NodeID(r.currentNode.Id))
|
connectionID, reqSink, resSource, err = r.signalClient.StartParticipantSignal(ctx, roomName, pi, nodeID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Errorw("could not handle new participant", err,
|
logger.Errorw("could not handle new participant", err,
|
||||||
"room", roomName,
|
"room", roomName,
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ func TestSignal(t *testing.T) {
|
|||||||
MinRetryInterval: 500 * time.Millisecond,
|
MinRetryInterval: 500 * time.Millisecond,
|
||||||
MaxRetryInterval: 5 * time.Second,
|
MaxRetryInterval: 5 * time.Second,
|
||||||
StreamBufferSize: 1000,
|
StreamBufferSize: 1000,
|
||||||
MinVersion: 1,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reqMessageIn := &livekit.SignalRequest{
|
reqMessageIn := &livekit.SignalRequest{
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ func createMultiNodeServer(nodeID string, port uint32) *service.LivekitServer {
|
|||||||
conf.RTC.TCPPort = port + 2
|
conf.RTC.TCPPort = port + 2
|
||||||
conf.Redis.Address = "localhost:6379"
|
conf.Redis.Address = "localhost:6379"
|
||||||
conf.Keys = map[string]string{testApiKey: testApiSecret}
|
conf.Keys = map[string]string{testApiKey: testApiSecret}
|
||||||
|
conf.SignalRelay.Enabled = true
|
||||||
|
|
||||||
currentNode, err := routing.NewLocalNode(conf)
|
currentNode, err := routing.NewLocalNode(conf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user