*set relayTimeout to 30 seconds
This commit is contained in:
parent
7834ed5e6d
commit
bcf4b0d998
21
src/index.ts
21
src/index.ts
|
@ -150,15 +150,28 @@ async function fetchFromRelays(
|
||||||
for (const relay of activeRelays) {
|
for (const relay of activeRelays) {
|
||||||
let query;
|
let query;
|
||||||
if (stream) {
|
if (stream) {
|
||||||
query = network.streamingQuery(relay, method, "ipfs", stream, {
|
query = network.streamingQuery(
|
||||||
|
relay,
|
||||||
|
method,
|
||||||
|
"ipfs",
|
||||||
|
stream,
|
||||||
|
{
|
||||||
hash,
|
hash,
|
||||||
path,
|
path,
|
||||||
});
|
},
|
||||||
|
{ relayTimeout: 30 }
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
query = network.simpleQuery(relay, method, "ipfs", {
|
query = network.simpleQuery(
|
||||||
|
relay,
|
||||||
|
method,
|
||||||
|
"ipfs",
|
||||||
|
{
|
||||||
hash,
|
hash,
|
||||||
path,
|
path,
|
||||||
});
|
},
|
||||||
|
{ relayTimeout: 30 }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
let resp = await query.result;
|
let resp = await query.result;
|
||||||
if (resp.error) {
|
if (resp.error) {
|
||||||
|
|
Loading…
Reference in New Issue