W3C home > Mailing lists > Public > public-webrtc@w3.org > January 2014

Calling close() on a closed PeerConnection

From: Adam Roach <abr@mozilla.com>
Date: Wed, 22 Jan 2014 08:59:10 -0600
Message-ID: <52DFDCBE.5070805@mozilla.com>
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
I distinctly recall (and have verified with other participants) having a 
conversation around the expected behavior when close() is invoked on a 
closed connection. My recollection is that the outcome of that 
conversation was that close() should be idempotent -- that is, calling 
close() on a closed connection should be a no-op.

The currently published editors' version of the spec, however, contains 
the following text:

> When the |close()| method is invoked, the user agent /MUST/ run the 
> following steps:
> 1.
>     If the ||RTCPeerConnection|
>     <http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCPeerConnection>|
>     object's |RTCPeerConnection| signalingState
>     <http://dev.w3.org/2011/webrtc/editor/webrtc.html#dom-peerconnection-signaling-state>
>     is |closed|, throw an |InvalidStateError| exception.

Based on the conversation we had, this needs to be changed to read: "If 
the RTCPeerConnection object's RTCPeerConnection signalingState is 
closed, abort these steps."

Adam Roach
Principal Platform Engineer
+1 650 903 0800 x863
Received on Wednesday, 22 January 2014 14:59:41 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 9 October 2019 15:15:12 UTC