From 2efc336d648d64ed34f2e504f233270757f6e142 Mon Sep 17 00:00:00 2001 From: Carlos Fuentes Date: Thu, 31 Oct 2024 08:54:33 +0100 Subject: [PATCH] revert: Update lib/dispatcher/client-h2.js --- lib/dispatcher/client-h2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dispatcher/client-h2.js b/lib/dispatcher/client-h2.js index 174185b4fbc..7d619fac4f6 100644 --- a/lib/dispatcher/client-h2.js +++ b/lib/dispatcher/client-h2.js @@ -324,7 +324,7 @@ function writeH2 (client, request) { // On Abort, we close the stream to send RST_STREAM frame stream.close() // We delay the destroy to allow the stream to send the RST_STREAM frame - setImmediate(() => util.destroy(stream, err)) + queueMicrotask(() => util.destroy(stream, err)) // We move the running index to the next request client[kQueue][client[kRunningIdx]++] = null client[kPendingIdx] = client[kRunningIdx]