Skip to content

Commit

Permalink
Merge pull request #552 from adam-be/set-description-failed
Browse files Browse the repository at this point in the history
Never close the RTCPeerConnection if setting a local/remote description fails (issue #364)
  • Loading branch information
alvestrand committed Mar 17, 2016
2 parents c70b1ec + ad2e625 commit 9f97f5b
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions webrtc.html
Expand Up @@ -686,38 +686,19 @@ <h4>Operation</h4>
"#widl-RTCSessionDescription-type">type</a></code> is wrong for
the current <a>signaling state</a> of
<var>connection</var>, then reject <var>p</var> with a <code>InvalidStateError</code> and abort these steps.</p>
</li>

<li>
<p>If the content of <var>description</var> is invalid,
then reject <var>p</var> with an
<code>InvalidAccessError</code> and abort these
steps.</p>
</li>

<li>
<p>If <var>description</var> cannot be applied at the media
layer, but the User Agent recovered, possibly by rolling back
to the previous configuration, then reject <var>p</var> with
<code>OperationError</code> and abort
these steps.</p>

<p>This occurs, for example, when the version of
<var>description</var> is older than the one currently
being used.</p>
</li>

<li>
<p>Otherwise, set <var>connection</var>'s <a>signaling state</a> to
<code>closed</code>.</p>
</li>

<li>
<p>Fire a simple event named <code><a href=
"#event-signalingstatechange">signalingstatechange</a></code>
at <var>connection</var>.</p>
</li>

<li>
<p>Reject <var>p</var> with <code>OperationError</code>.</p>
<p>For all other errors, for example if
<var>description</var> cannot be applied at the media layer,
reject <var>p</var> with <code>OperationError</code>.</p>
</li>
</ol>
</li>
Expand Down

0 comments on commit 9f97f5b

Please sign in to comment.