From 5e6e972cc7b733db8ee7adb8b29134e01230e47c Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Mon, 9 Nov 2020 16:21:54 +0100 Subject: [PATCH] Never manually emit errors on streams See: https://github.com/nodejs/node/issues/36053 --- .../kbn-es-archiver/src/lib/streams/concat_stream_providers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.ts b/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.ts index 4794d76cc7f846c..be0768316b2930d 100644 --- a/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.ts +++ b/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.ts @@ -50,7 +50,7 @@ export function concatStreamProviders( source // proxy errors from the source to the destination - .once('error', (error) => destination.emit('error', error)) + .once('error', (error) => destination.destroy(error)) // pipe the source to the destination but only proxy the // end event if this is the last source .pipe(destination, { end: isLast });