From fe7872888b45890b056dcd496141174698d42999 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Wed, 3 Nov 2021 16:49:27 +0200 Subject: [PATCH] fix(phisherman): fix caught errors still throwing in getPhishermanDomainInfo() --- backend/src/data/Phisherman.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/data/Phisherman.ts b/backend/src/data/Phisherman.ts index 5f95f347..9ab1ef00 100644 --- a/backend/src/data/Phisherman.ts +++ b/backend/src/data/Phisherman.ts @@ -147,7 +147,7 @@ export async function getPhishermanDomainInfo(domain: string): Promise { + let promise = (async () => { if (memoryCache.has(domain)) { return memoryCache.get(domain)!.info; } @@ -181,7 +181,7 @@ export async function getPhishermanDomainInfo(domain: string): Promise { + promise = promise.finally(() => { pendingDomainInfoChecks.delete(domain); }); pendingDomainInfoChecks.set(domain, promise);