Skip to content

Commit

Permalink
Merge pull request #27 from spothound/timeout
Browse files Browse the repository at this point in the history
Timeout
  • Loading branch information
spothound authored Jun 26, 2024
2 parents 999c030 + 728721c commit 10da0ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/setup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const submitForm = async () => {
const getPuzzles = async (eloMin: number, eloMax: number, numberOfPuzzles: number, retries: number = 10, delay: number = 5000) => {
for (let i = 0; i < retries; i++) {
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 60000); // 1 minute timeout
const timeoutId = setTimeout(() => controller.abort(), 5000); // 1 minute timeout
try {
const response = await fetch(`${apiUrl}/puzzles/rating/${eloMin}/${eloMax}?limit=${numberOfPuzzles}`, { signal: controller.signal });
Expand Down

0 comments on commit 10da0ca

Please sign in to comment.