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