WebRTC iceconnectionstatechange and connectionstatechange dont fire "closed" event in Chrome 80. Does anyone have any workaround to detect the connectionstatechange when peer is closed? It doesnot fire even in plan-b
Asked
Active
Viewed 773 times
1 Answers
1
They don't fire when calling pc.close() anymore. See https://bugs.chromium.org/p/chromium/issues/detail?id=1023736
If your JS code calls pc.close() you surely have detected that the other side went away somehow.

Philipp Hancke
- 15,855
- 2
- 23
- 31
-
Are pc.close() and iceconnectionstate in sync? If I close a peer and access its icestate in the next line, will the iceconnectionstate be in the state closed? How do I get a proper acknowledgement? – Anthony Feb 06 '20 at 11:53
-
close isn't something that is acknowledged in any way. But according to https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-close it is a synchronous operation. In general you call close and dispose the peerconnection without further thinking. – Philipp Hancke Feb 06 '20 at 13:16
-
Thanks for your input. our reconnection mechanism was based on the ice closed state, so basically this has broke the reconnection completely. – Anthony Feb 10 '20 at 07:16