Skip to content

Commit

Permalink
Merge pull request #37 from dmccartney/daniel-no-timeout-ipfs
Browse files Browse the repository at this point in the history
fix: remove 8s timeout from ipfs requests
  • Loading branch information
dmccartney authored Jan 18, 2024
2 parents be88f9f + a7697fd commit b0de697
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions web/src/hooks/useFetchJSONZST.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ export async function fetchJSONZST(url) {
return fetch(url).then((res) => res.json());
}
let initingZst = zst.init();
let res = await fetch(url, {
// IPFS gateways are slow to timeout on their own.
signal: AbortSignal.timeout(8000), // ms
});
let res = await fetch(url);
if (!res.ok) {
throw new Error(`failure fetching JSON ZST from ${url}`);
}
Expand Down

0 comments on commit b0de697

Please sign in to comment.