mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 17:45:40 +00:00
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"`
|
||||
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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -28,7 +28,6 @@ func TestSignal(t *testing.T) {
|
||||
MinRetryInterval: 500 * time.Millisecond,
|
||||
MaxRetryInterval: 5 * time.Second,
|
||||
StreamBufferSize: 1000,
|
||||
MinVersion: 1,
|
||||
}
|
||||
|
||||
reqMessageIn := &livekit.SignalRequest{
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user