Skip to content

Commit 1d0a7a5

Browse files
committed
fixup: unhandledRejection
1 parent bb882a2 commit 1d0a7a5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/internal/streams/pipeline.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ async function pump(iterable, writable, finish) {
164164
const errorPromise = new Promise((resolve, reject) => {
165165
writable.on('error', reject);
166166
});
167+
// Don't propagate to unhandledRejection
168+
errorPromise.catch(() => {});
167169
for await (const chunk of iterable) {
168170
await Promise.race([
169171
errorPromise,

0 commit comments

Comments
 (0)