Re: [whatwg/streams] Fix pipeTo() to ensure all read chunks are written (#726)

Note: the two steps (write any read chunks; wait for writes to finish) don't apply in all shutdown cases. In particular they only apply when the source errors or closes. This leads to some duplication. However the alternate approach of only putting those steps underneath their corresponding conditions ("Errors must be propagated forward" and "Closing must be propagated forward") meant you also needed to duplicate the shuttingDown set/check under those conditions. So this version seemed cleanest to me.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/726#issuecomment-292114299

Received on Thursday, 6 April 2017 09:09:18 UTC