From reviewing the code I notice the following:
https://github.com/nodejs/node/blob/master/lib/internal/streams/pipeline.js#L116
for await (const chunk of iterable) {
if (!writable.write(chunk)) {
if (writable.destroyed) return;
await EE.once(writable, 'drain');
}
}
In particular the following:
await EE.once(writable, 'drain');
writable might never emit 'drain' or 'error', instead only 'close' might be emitted. A bit unfortunate but that's how streams work.
From reviewing the code I notice the following:
https://github.com/nodejs/node/blob/master/lib/internal/streams/pipeline.js#L116
In particular the following:
writablemight never emit'drain'or'error', instead only'close'might be emitted. A bit unfortunate but that's how streams work.