Configurable migration wait duration for longer waits in simulation. (#4624)

Only applies if it is more than the default 3 seconds.
This commit is contained in:
Raja Subramanian
2026-06-26 20:01:32 +05:30
committed by GitHub
parent eb3de092f0
commit 23090163ce
+2 -1
View File
@@ -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() {