- From: Takeshi Yoshino <notifications@github.com>
- Date: Mon, 16 Mar 2015 06:26:59 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Message-ID: <whatwg/streams/pull/296/r26483303@github.com>
> - if (source.state === 'readable') {
> - Promise.race([source.closed, dest.ready]).then(doPipe, doPipe);
> - } else if (source.state === 'waiting') {
> - Promise.race([source.ready, dest.ready]).then(doPipe);
> - } else if (source.state === 'errored') {
> - source.closed.catch(abortDest);
> - } else if (source.state === 'closed') {
> - closeDest();
> - }
> - } else if (ds === 'errored' && (source.state === 'readable' || source.state === 'waiting')) {
> - dest.closed.catch(cancelSource);
> - } else if ((ds === 'closing' || ds === 'closed') &&
> - (source.state === 'readable' || source.state === 'waiting')) {
> - cancelSource(new TypeError('destination is closing or closed and cannot be piped to anymore'));
> + lastRead = reader.read();
> + Promise.all([lastRead, dest.ready]).then(([{ value, done }]) => {
Need to address https://github.com/whatwg/streams/pull/288#discussion_r25886680 ?
---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/296/files#r26483303
Received on Monday, 16 March 2015 13:27:38 UTC