From 898395d83d5e9aa5684c03f843d927a5b0365263 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Tue, 17 Dec 2024 15:43:55 +0700 Subject: [PATCH] Properly handle failed promises (#7488) Signed-off-by: Andrey Sobolev --- packages/core/src/utils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/core/src/utils.ts b/packages/core/src/utils.ts index 36e250c1a5..422b564a66 100644 --- a/packages/core/src/utils.ts +++ b/packages/core/src/utils.ts @@ -352,7 +352,11 @@ export class RateLimiter { } async waitProcessing (): Promise { - await Promise.all(this.processingQueue.values()) + while (this.processingQueue.size > 0) { + await new Promise((resolve) => { + this.notify.push(resolve) + }) + } } }