*set relayTimeout to 30 seconds

This commit is contained in:
Derrick Hammer 2022-08-31 18:25:55 -04:00
parent 7834ed5e6d
commit bcf4b0d998
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 21 additions and 8 deletions

View File

@ -150,15 +150,28 @@ async function fetchFromRelays(
for (const relay of activeRelays) {
let query;
if (stream) {
query = network.streamingQuery(relay, method, "ipfs", stream, {
hash,
path,
});
query = network.streamingQuery(
relay,
method,
"ipfs",
stream,
{
hash,
path,
},
{ relayTimeout: 30 }
);
} else {
query = network.simpleQuery(relay, method, "ipfs", {
hash,
path,
});
query = network.simpleQuery(
relay,
method,
"ipfs",
{
hash,
path,
},
{ relayTimeout: 30 }
);
}
let resp = await query.result;
if (resp.error) {