From 16e1aab1c2ec896593b19364e7a611c6376f9c5e Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Mon, 9 Jun 2025 20:37:53 +0000 Subject: [PATCH] fix: avoid potential queuing dead lock --- src/utils/Fetcher.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/Fetcher.ts b/src/utils/Fetcher.ts index 80ab825..151f35a 100644 --- a/src/utils/Fetcher.ts +++ b/src/utils/Fetcher.ts @@ -253,9 +253,10 @@ export class Fetcher { const queueErrorLimit = init?.queueErrorLimit ?? 10; await this.lockFetchSlot(url.host, queueErrorLimit); - await this.waitForHostQueueCount(url.host, queueLimit, queueErrorLimit); try { + await this.waitForHostQueueCount(url.host, queueLimit, queueErrorLimit); + return await this.fetchWithTimeout(ctx, url, init); } finally { await this.unlockFetchSlot(url.host);