Re: [ServiceWorker] Fetch API respondWith's implicit RETURN (#844)

Hi Jake, If you scroll up to the "Here's the code" example (and thanks for tidying up) you'll see that REPLIED is a boolean that was there to prevent respondWith() being called more than once. REPLY is called by each thread when it decides it has a response contender.

This logic is redundant now that I've had to move to a Promise (probably better anyway). That is, the Promise is settled once and forever so the late comers can knock themselves out without any exceptions thrown.

Now if I can just apply that Promise logic to why inBuff ends up resolved after it's REJECT has been called then I'll be done.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/844#issuecomment-195859322

Received on Sunday, 13 March 2016 02:54:21 UTC