New issue
Advanced search Search tips

Issue 849247 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

RTCPeerConnection.close() should not cause events to be fired?

Project Member Reported by hbos@chromium.org, Jun 4 2018

Issue description

Per spec, https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-close, signaling state is set to "closed" (step 4), but signalingstatechange is not fired.

Step 9 says to destroy the ICE agent, abruptly ending any active ice processing. It is intended we end up in the "closed" ice connection state, or else there is no usage of the "closed" enum value.

Either it is a spec bug that it does not explicitly set the ice connection state on close(), or this is covered by "update ice connection state" which is invoked "When the ICE Agent indicates that the RTCIceTransportState for an RTCIceTransport has changed, the user agent MUST queue a task that runs the following steps: ...".

However that would imply that we should fire ice connection state and connectionchangestate events on close() asynchronously.

We should either fire all events or none of the events on close() for consistency, and if we fire them all of them should either be fired asynchronously or all of them should be fired synchronously.
 

Comment 1 by hbos@chromium.org, Jun 4 2018

Filed https://github.com/w3c/webrtc-pc/issues/1883, not sure what is intended behavior.

Comment 2 by hbos@chromium.org, Jun 7 2018

Cc: hta@chromium.org orphis@chromium.org
The spec issue got resolved by updating the spec.
The correct behavior is to set the the states synchronously on close() without firing the associated events.
- Set signaling state to "closed".
- Set ICE connection state to "closed".
- Set connection state to "closed".

Sign in to add a comment