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

Re: [webrtc-pc] Race condition in enqueue an operation

From: Taylor Brandstetter via GitHub <sysbot+gh@w3.org>
Date: Mon, 26 Jun 2017 08:10:58 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-310991892-1498464656-sysbot+gh@w3.org>
Let's actually examine what the synchronous steps we're talking about are:

1. Checking if `remoteDescription` is `null` in `createAnswer` and `addIceCandidate`.
2. Checking if an ICE candidate's `sdpMid`/`sdpMLineIndex` are non-null.
3. Checking that an ICE candidate's `sdpMid` matches an "m=" section.

I don't think these are errors you'd need a debugger to help figure out; they're pretty obvious.

But on the other hand, I also don't see any race conditions these steps could introduce; they're dependent only on the results of other enqueued operations. So the only possible race is with `pc.close()`, as pointed out at the top of this issue. Which is probably not worth fixing.

So, although I don't see the point of the "execute immediately if queue is empty" rule, it doesn't seem to really be hurting anything.

-- 
GitHub Notification of comment by taylor-b
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1218#issuecomment-310991892 using your GitHub account
Received on Monday, 26 June 2017 08:11:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 4 June 2019 15:32:44 UTC