pion / example-webrtc-applications

Examples of WebRTC applications that are large, or use 3rd party libraries

Home Page:https://pion.ly/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sfu-ws: Error when SetLocalDescription

kisasexypantera94 opened this issue · comments

Hi, i'm running sfu-ws example and have this error when second user is connecting:

InvalidModificationError: invalid proposed signaling state transition: have-local-offer->SetLocal(offer)->have-local-offer

It happens here:

if err = peerConnections[i].peerConnection.SetLocalDescription(offer); err != nil {

Found my answer in #pion slack channel. So the error means that I haven’t finished last round of negotiation - this makes sense because calls to setLocal and setRemote are concurrent