W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > June 2018

[webrtc-pc] Firing signalingstatechange early and synchronously invites trouble

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Tue, 05 Jun 2018 15:14:08 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issues.opened-329503387-1528211647-sysbot+gh@w3.org>
jan-ivar has just created a new issue for https://github.com/w3c/webrtc-pc:

== Firing signalingstatechange early and synchronously invites trouble ==
When we set local/remote descriptions, we _"fire a simple event named signalingstatechange at connection"_—which reduces to synchronously calling JS callbacks—and we do this *before* most of the actual work.

Suppose JS calls `pc.close()` in that event/callback.
Which of the remaining steps do we do?

We've dealt with similar problems in the past (https://github.com/w3c/webrtc-pc/pull/1720) by deferring firing of events to the end of the algorithm. I think we need to do that here as well. That way it would stil fire before SLD/SRD succeeds, like now.

This would change the timing somewhat, but hopefully for the better.

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1885 using your GitHub account
Received on Tuesday, 5 June 2018 15:14:10 UTC

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