W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > March 2020

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

From: Lennart Grahl via GitHub <sysbot+gh@w3.org>
Date: Wed, 11 Mar 2020 08:53:20 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-597514563-1583916799-sysbot+gh@w3.org>
You're not alone with that perception. I find it extremely hard to wrap my head around the logic to "not fire when you have caused the event" because then I always wonder what is supposed to happen to all the other closely related moving parts. If I close a peer connection, should data channel `close` events still fire? Should the state event on the SCTP transport fire? As someone who worked a ton with this stuff, I have encountered multiple game-breaking bugs in my own applications due to browsers "fixing" the logic because even they can't get it right. Really, I am lost on that one. Personally, I would find it a lot simpler to just always fire and make no exceptions. Otherwise, we should have an event firing matrix.

Sorry for the rant. :heart: 

GitHub Notification of comment by lgrahl
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1883#issuecomment-597514563 using your GitHub account
Received on Wednesday, 11 March 2020 08:53:25 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:50 UTC