From 9f51cd5a4738391f63c6f2f2a44df40260083a16 Mon Sep 17 00:00:00 2001 From: Jules Testard Date: Fri, 4 Oct 2024 14:30:52 +0200 Subject: [PATCH] disable check for last answer --- peerconnection.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/peerconnection.go b/peerconnection.go index d515c08a7b2..978b7f121a2 100644 --- a/peerconnection.go +++ b/peerconnection.go @@ -870,6 +870,7 @@ func (pc *PeerConnection) setDescription(sd *SessionDescription, op stateChangeO setRemote := stateChangeOpSetRemote newSDPDoesNotMatchOffer := &rtcerr.InvalidModificationError{Err: errSDPDoesNotMatchOffer} newSDPDoesNotMatchAnswer := &rtcerr.InvalidModificationError{Err: errSDPDoesNotMatchAnswer} + _ = newSDPDoesNotMatchAnswer var nextState SignalingState var err error @@ -889,7 +890,8 @@ func (pc *PeerConnection) setDescription(sd *SessionDescription, op stateChangeO // have-local-pranswer->SetLocal(answer)->stable case SDPTypeAnswer: if sd.SDP != pc.lastAnswer { - return nextState, newSDPDoesNotMatchAnswer + pc.lastAnswer = sd.SDP + // return nextState, nil } nextState, err = checkNextSignalingState(cur, SignalingStateStable, setLocal, sd.Type) if err == nil { @@ -906,7 +908,8 @@ func (pc *PeerConnection) setDescription(sd *SessionDescription, op stateChangeO // have-remote-offer->SetLocal(pranswer)->have-local-pranswer case SDPTypePranswer: if sd.SDP != pc.lastAnswer { - return nextState, newSDPDoesNotMatchAnswer + pc.lastAnswer = sd.SDP + // return nextState, nil } nextState, err = checkNextSignalingState(cur, SignalingStateHaveLocalPranswer, setLocal, sd.Type) if err == nil {