Skip to content

Commit

Permalink
timeout for reachability checks
Browse files Browse the repository at this point in the history
  • Loading branch information
swantzter committed Jul 2, 2024
1 parent 5c14d42 commit 5b8d1c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const resolvedReachable = useFetch(
computed(() => `https://${localDiscover.data.value}/.well-known/apollo/server-health`),
{
refetch: computed(() => typeof localDiscover.data.value === 'string' && /\.local\.ropescore\.com(:\d+)?$/.test(localDiscover.data.value)),
immediate: false
immediate: false,
timeout: 5_000
}
).get().json()
useIntervalFn(() => {
Expand All @@ -30,7 +31,8 @@ const manualReachable = useFetch(
: `https://${localManual.value}.local.ropescore.com/.well-known/apollo/server-health`),
{
refetch: computed(() => !!localManual.value && localManual.value !== 'null'),
immediate: !!localManual.value
immediate: !!localManual.value,
timeout: 5_000
}
).get().json()
useIntervalFn(() => {
Expand Down

0 comments on commit 5b8d1c2

Please sign in to comment.