Have to go through the full ICE restart checks after gatheting finishes. (#963)

This commit is contained in:
Raja Subramanian
2022-08-29 09:45:38 +05:30
committed by GitHub
parent b99d128c6c
commit 4217f198d6
2 changed files with 16 additions and 12 deletions
+6 -6
View File
@@ -234,7 +234,12 @@ func TestFirstAnswerMissedDuringICERestart(t *testing.T) {
// first anwser missed
var firstAnswerReceived atomic.Bool
transportB.OnAnswer(func(sd webrtc.SessionDescription) error {
firstAnswerReceived.Store(true)
if firstAnswerReceived.Load() {
transportA.HandleRemoteDescription(sd)
} else {
// do not send first answer so that remote misses the first answer
firstAnswerReceived.Store(true)
}
return nil
})
transportA.OnOffer(func(sd webrtc.SessionDescription) error {
@@ -250,11 +255,6 @@ func TestFirstAnswerMissedDuringICERestart(t *testing.T) {
// set offer/answer with restart ICE, will negotiate twice,
// first one is recover from missed offer
// second one is restartICE
transportB.OnAnswer(func(answer webrtc.SessionDescription) error {
transportA.HandleRemoteDescription(answer)
return nil
})
var offerCount atomic.Int32
transportA.OnOffer(func(sd webrtc.SessionDescription) error {
offerCount.Inc()