From e03b7ef8deee0498f557c10c66bfcf7a896fce20 Mon Sep 17 00:00:00 2001 From: Paul Wells Date: Thu, 18 May 2023 12:39:02 -0700 Subject: [PATCH] start signal relay sessions with the correct node (#1721) * start signal relay sessions with the correct node * enable signal relay in multiregion integration test --- pkg/config/config.go | 1 - pkg/routing/localrouter.go | 2 +- pkg/service/signal_test.go | 1 - test/integration_helpers.go | 1 + 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 86138a0d9..eded926ca 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -210,7 +210,6 @@ type SignalRelayConfig struct { MinRetryInterval time.Duration `yaml:"min_retry_interval,omitempty"` MaxRetryInterval time.Duration `yaml:"max_retry_interval,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 diff --git a/pkg/routing/localrouter.go b/pkg/routing/localrouter.go index 2c5c39a98..da43566db 100644 --- a/pkg/routing/localrouter.go +++ b/pkg/routing/localrouter.go @@ -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) { - 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 { logger.Errorw("could not handle new participant", err, "room", roomName, diff --git a/pkg/service/signal_test.go b/pkg/service/signal_test.go index a953fd9dc..946675864 100644 --- a/pkg/service/signal_test.go +++ b/pkg/service/signal_test.go @@ -28,7 +28,6 @@ func TestSignal(t *testing.T) { MinRetryInterval: 500 * time.Millisecond, MaxRetryInterval: 5 * time.Second, StreamBufferSize: 1000, - MinVersion: 1, } reqMessageIn := &livekit.SignalRequest{ diff --git a/test/integration_helpers.go b/test/integration_helpers.go index a9e633f83..b0354d866 100644 --- a/test/integration_helpers.go +++ b/test/integration_helpers.go @@ -170,6 +170,7 @@ func createMultiNodeServer(nodeID string, port uint32) *service.LivekitServer { conf.RTC.TCPPort = port + 2 conf.Redis.Address = "localhost:6379" conf.Keys = map[string]string{testApiKey: testApiSecret} + conf.SignalRelay.Enabled = true currentNode, err := routing.NewLocalNode(conf) if err != nil {