otalk / rtcpeerconnection-shim

Implementation of the RTCPeerConnection API ontop of ORTC
BSD 3-Clause "New" or "Revised" License
15 stars 14 forks source link

`InvalidStateError` starting dtlsTransport #169

Open syerrapragada opened 5 years ago

syerrapragada commented 5 years ago

I just encountered an error accidentally playing with the following fiddle https://jsfiddle.net/96xgh2fq/

Second negotiation in the fiddle fails at setLocalDescription with InvalidStateError.

Sometimes at line: https://github.com/otalk/rtcpeerconnection-shim/blob/master/rtcpeerconnection.js#L699

Mosttimes at line: https://github.com/otalk/rtcpeerconnection-shim/blob/master/rtcpeerconnection.js#L703