Skip to content

Commit

Permalink
disable check for last answer
Browse files Browse the repository at this point in the history
  • Loading branch information
jtestard committed Oct 4, 2024
1 parent c088755 commit 9f51cd5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions peerconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 9f51cd5

Please sign in to comment.