From 23090163ce42cddad6c42336c12d54f3419a26a6 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Fri, 26 Jun 2026 20:01:32 +0530 Subject: [PATCH] Configurable migration wait duration for longer waits in simulation. (#4624) Only applies if it is more than the default 3 seconds. --- pkg/rtc/participant.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/rtc/participant.go b/pkg/rtc/participant.go index 1cf5bb5b..915a7022 100644 --- a/pkg/rtc/participant.go +++ b/pkg/rtc/participant.go @@ -227,6 +227,7 @@ type ParticipantParams struct { DisableTransceiverReuseForE2EE bool EnableParticipantDataBlob bool EnableStartAtDesiredQuality bool + MigrationWaitDuration time.Duration } type ParticipantImpl struct { @@ -1572,7 +1573,7 @@ func (p *ParticipantImpl) setupMigrationTimerLocked() { // to try and succeed. If not, close the subscriber peer connection // and help the remote side to narrow down its ICE candidate pool. // - p.migrationTimer = time.AfterFunc(migrationWaitDuration, func() { + p.migrationTimer = time.AfterFunc(max(p.params.MigrationWaitDuration, migrationWaitDuration), func() { p.clearMigrationTimer() if p.IsClosed() || p.IsDisconnected() {