From a02e782e4998c01ff5ad9d9891449caab0931c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Thu, 23 Apr 2026 21:55:29 +0200 Subject: [PATCH] process: handle rejections only when needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gürgün Dayıoğlu --- lib/internal/process/task_queues.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/internal/process/task_queues.js b/lib/internal/process/task_queues.js index 84f406cd5e8f54..484fa4ea2f9d3e 100644 --- a/lib/internal/process/task_queues.js +++ b/lib/internal/process/task_queues.js @@ -102,7 +102,8 @@ function processTicksAndRejections() { AsyncContextFrame.set(priorContextFrame); } runMicrotasks(); - } while (!queue.isEmpty() || processPromiseRejections()); + } while (!queue.isEmpty() || + (hasRejectionToWarn() && processPromiseRejections())); setHasTickScheduled(false); setHasRejectionToWarn(false); }