- From: Domenic Denicola <notifications@github.com>
- Date: Thu, 05 Mar 2015 10:12:22 -0800
- To: whatwg/streams <streams@noreply.github.com>
- Message-ID: <whatwg/streams/pull/288/r25886680@github.com>
> - } else if (ds === 'waiting') { > - 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')); > + Promise.all([source.read(), dest.ready]).then(([chunk]) => { Hmm. I guess in that case we will just keep doing `dest.write()` and ignoring the fact that it fails. That is indeed silly and so we should not do it. But it at least explains why no tests were failing. --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/pull/288/files#r25886680
Received on Thursday, 5 March 2015 18:12:52 UTC