Issue full reconnect if subscriber PC is closed on ICERestart (#1919)

Server could have closed subscriber PC to aid migration.
But, if a resumes lands back on that node, a resume of
the participant session is not possible as subscriber PC is already
closed. While theoretically possible to form a new subscriber
peer conenction, reducing complexity and issuing a full reconnect
as this should be a rare case.
This commit is contained in:
Raja Subramanian
2023-07-31 11:43:47 +05:30
committed by GitHub
parent 872b86da3b
commit eecddbb65a
3 changed files with 20 additions and 11 deletions
+3 -1
View File
@@ -863,7 +863,9 @@ func (p *ParticipantImpl) ICERestart(iceConfig *livekit.ICEConfig) {
t.(types.LocalMediaTrack).Restart()
}
p.TransportManager.ICERestart(iceConfig)
if err := p.TransportManager.ICERestart(iceConfig); err != nil {
p.IssueFullReconnect(types.ParticipantCloseReasonNegotiateFailed)
}
}
func (p *ParticipantImpl) OnICEConfigChanged(f func(participant types.LocalParticipant, iceConfig *livekit.ICEConfig)) {