W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > October 2019

[webrtc-pc] iceconnectionstatechange event after PeerConnection.close() is called (#2335)

From: jianjunz via GitHub <sysbot+gh@w3.org>
Date: Sun, 20 Oct 2019 08:43:55 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issues.opened-509564981-1571561034-sysbot+gh@w3.org>
jianjunz has just created a new issue for https://github.com/w3c/webrtc-pc:

== iceconnectionstatechange event after PeerConnection.close() is called ==
When the `close` method of `RTCPeerConnection` is invoked, user agent runs the following steps[1]:

> ...
> 3. Set `connection.[[IsClosed]]` to true. 
> ...
> 11. Set connection's ICE connection state to "closed".
> ...

If I understand correctly, "setting connection's ICE connection state to closed"(step 11) runs the  "update the ICE connection state" process[2].

> 1. If `connection.[[IsClosed]]` is true, abort these steps. (**It's always true**)
> 2. Let `newState` be the value of deriving a new state value as described by the `RTCIceConnectionState` enum.
> 3. If connection's ICE connection state is equal to `newState`, abort these steps.
> 4. Set connection's ice connection state to `newState`.
> 5. Fire an event named `iceconnectionstatechange` at `connection`.

As `connection.[[IsClosed]]` is always true in this case, step 2 to step 5 should not be executed. Does it mean user agent should not fire `iceconnectionstatechange` after `PeerConnection.close()` is called?

My observation is Safari doesn't fire `iceconnectionstatechange` after `PeerConnection.close()`, however, Chrome and Firefox does.

[1] https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-close
[2] https://w3c.github.io/webrtc-pc/#update-the-ice-connection-state

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2335 using your GitHub account
Received on Sunday, 20 October 2019 08:43:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:22:29 UTC