*Ensure the dns module is ready before making a query
This commit is contained in:
parent
512b85aa55
commit
ffe6c9595e
|
@ -1,5 +1,8 @@
|
|||
import NodeCache from "node-cache";
|
||||
import { resolve as resolveDns } from "@lumeweb/kernel-dns-client";
|
||||
import {
|
||||
ready as dnsReady,
|
||||
resolve as resolveDns,
|
||||
} from "@lumeweb/kernel-dns-client";
|
||||
import {
|
||||
DNS_RECORD_TYPE,
|
||||
DNSRecord,
|
||||
|
@ -24,6 +27,8 @@ export async function resolve(
|
|||
return cache.get(cacheId) as DNSResult;
|
||||
}
|
||||
|
||||
await dnsReady();
|
||||
|
||||
let res;
|
||||
try {
|
||||
res = await resolveDns(domain, options, bypassCache);
|
||||
|
|
Reference in New Issue