mirror of
https://github.com/livekit/livekit.git
synced 2026-08-28 02:54:12 +00:00
Force full reconnect when there is no previous answer during migration. (#1168)
This commit is contained in:
@@ -1123,6 +1123,14 @@ func (t *PCTransport) initPCWithPreviousAnswer(previousAnswer webrtc.SessionDesc
|
||||
}
|
||||
|
||||
func (t *PCTransport) SetPreviousSdp(offer, answer *webrtc.SessionDescription) {
|
||||
// when there is no previous answer, cannot migrate, force a full reconnect
|
||||
if answer == nil {
|
||||
if onNegotiationFailed := t.getOnNegotiationFailed(); onNegotiationFailed != nil {
|
||||
onNegotiationFailed()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
t.lock.Lock()
|
||||
if t.pc.RemoteDescription() == nil && t.previousAnswer == nil {
|
||||
t.previousAnswer = answer
|
||||
|
||||
Reference in New Issue
Block a user