mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
fix(phisherman): fix caught errors still throwing in getPhishermanDomainInfo()
This commit is contained in:
parent
fb44a6558f
commit
fe7872888b
1 changed files with 2 additions and 2 deletions
|
@ -147,7 +147,7 @@ export async function getPhishermanDomainInfo(domain: string): Promise<Phisherma
|
||||||
return pendingDomainInfoChecks.get(domain)!;
|
return pendingDomainInfoChecks.get(domain)!;
|
||||||
}
|
}
|
||||||
|
|
||||||
const promise = (async () => {
|
let promise = (async () => {
|
||||||
if (memoryCache.has(domain)) {
|
if (memoryCache.has(domain)) {
|
||||||
return memoryCache.get(domain)!.info;
|
return memoryCache.get(domain)!.info;
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ export async function getPhishermanDomainInfo(domain: string): Promise<Phisherma
|
||||||
|
|
||||||
return freshData;
|
return freshData;
|
||||||
})();
|
})();
|
||||||
promise.finally(() => {
|
promise = promise.finally(() => {
|
||||||
pendingDomainInfoChecks.delete(domain);
|
pendingDomainInfoChecks.delete(domain);
|
||||||
});
|
});
|
||||||
pendingDomainInfoChecks.set(domain, promise);
|
pendingDomainInfoChecks.set(domain, promise);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue