From 0ec46d740734c1c2f42bdd987cd108a1c984ad0e Mon Sep 17 00:00:00 2001 From: Matthieu Sieben Date: Thu, 26 Sep 2024 13:25:26 +0200 Subject: [PATCH] stream: properly destroy duplexified functions Co-authored-by: Jason Zhang --- lib/internal/streams/duplexify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/streams/duplexify.js b/lib/internal/streams/duplexify.js index 033884a5a7e5c9..12073bc9466c45 100644 --- a/lib/internal/streams/duplexify.js +++ b/lib/internal/streams/duplexify.js @@ -248,7 +248,7 @@ function fromAsyncGen(fn, destructor) { const { cb } = await _promise; process.nextTick(cb); - destructor(); + process.nextTick(destructor); } } };