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

close() causes signalingState, iceConnectionState and connectionState to be closed. Whether or not it makes sense to fire an event caused by an explicit synchronous API call (as oppose to the other usages of the listeners: callbacks from asynchronous operations) can be debated, but if the old behavior is easy to shim: when invoking close(), also invoke these event handlers.

> It is especially annoying, as it does not even happen if the remote side calls close().

The remote endpoint closing is irrelevant to this issue. The only one than can cause your local PC to close is you explicitly calling the synchronous API close().

(There may currently be a bug in Chrome under investigation about RTCP BYE messages not being sent in some cases but that is not what this issue is about.)

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

Received on Wednesday, 11 March 2020 10:12:22 UTC