3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 02:25:01 +00:00

fix(phisherman): fix caught errors still throwing in getPhishermanDomainInfo()

This commit is contained in:
Dragory 2021-11-03 16:49:27 +02:00
parent e25f77d8a9
commit 02efc71bd2

View file

@ -147,7 +147,7 @@ export async function getPhishermanDomainInfo(domain: string): Promise<Phisherma
return pendingDomainInfoChecks.get(domain)!;
}
const promise = (async () => {
let promise = (async () => {
if (memoryCache.has(domain)) {
return memoryCache.get(domain)!.info;
}
@ -181,7 +181,7 @@ export async function getPhishermanDomainInfo(domain: string): Promise<Phisherma
return freshData;
})();
promise.finally(() => {
promise = promise.finally(() => {
pendingDomainInfoChecks.delete(domain);
});
pendingDomainInfoChecks.set(domain, promise);