Re: [webrtc-pc] Is close() supposed to fire state change events? Connection state change set asynchronously?

> I would think that invoking a synchronous API should set all three of these states synchronously and not fire any events.

Agree. pc.[close](http://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-close) already says:

 * _"Set the [[IceTransportState]] slot of each of connection's RTCIceTransports to "closed"."_

...which sets the internal slot directly, side-stepping the algorithm that normally sets it¹, as well as the other states. So it looks like we're missing:

 * Set connection's ICE connection state to "closed".
 * Set connection's ICE gathering state to "closed".
 * Set connection's connection state to "closed".

<sup>1. Search for "When the ICE Agent indicates that the RTCIceTransportState for an RTCIceTransport has changed"</sup>

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1883#issuecomment-394857626 using your GitHub account

Received on Tuesday, 5 June 2018 20:57:43 UTC