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

ricea commented on this pull request.



> @@ -187,6 +187,16 @@ class ReadableStream {
         rethrowAssertionErrorRejection(err);
       });
 
+      function waitForWritesToFinish() {
+        if (dest._state === 'writable' && WritableStreamCloseQueuedOrInFlight(dest) === false) {
+          // Another write may have started while we were waiting on this currentWrite, so we have to be sure to wait
+          // for that too.
+          const before = currentWrite;

I find the name `before` a little unclear. I don't have strong feelings about it, but maybe `oldCurrentWrite` would be better?

-- 
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#pullrequestreview-31283179

Received on Thursday, 6 April 2017 11:07:55 UTC