*Check if we have peers when doing a IPNS lookup and if not, force reset the peer defer, then await on it
This commit is contained in:
parent
fd2d66d2c4
commit
bc10722539
|
@ -304,6 +304,12 @@ async function handleIpnsResolve(aq: ActiveQuery) {
|
|||
|
||||
await activePeersDefer.promise;
|
||||
|
||||
if (PeerManager.instance.ipfs.libp2p.getPeers().length === 0) {
|
||||
activePeersDefer = defer();
|
||||
}
|
||||
|
||||
await activePeersDefer.promise;
|
||||
|
||||
if (!aq.callerInput || !("cid" in aq.callerInput)) {
|
||||
aq.reject("cid required");
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue