Skip to content

Commit

Permalink
another attempted socket hang up fix
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Nov 4, 2023
1 parent 0b5bee8 commit 5bd8cfb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/helpers/functions/missing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ export const computeAndUpdate = async (

let packProgress: any;
try {
/** @todo fix "Error: socket hang up" from this line of code */
packProgress = (await axios.get(`${client.tokens.apiUrl}settings/raw`)).data.channels
.pack_progress;
const prom = await axios
.get(`${client.tokens.apiUrl}settings/channels.pack_progress`)
// fix for "Error: socket hang up"
.catch(() => axios.get(`https://api.faithfulpack.net/v2/settings/channels.pack_progress`));
packProgress = prom.data;
} catch {
return results;
}
Expand Down

0 comments on commit 5bd8cfb

Please sign in to comment.