Commit 1271bea4 authored by Florian Pagnoux's avatar Florian Pagnoux
Browse files

Improve resilience to race conditions on MAC

parent 57248606
...@@ -60,7 +60,7 @@ async function fetchParam(key, previousTries = 0) { ...@@ -60,7 +60,7 @@ async function fetchParam(key, previousTries = 0) {
const response = await fetch(`http://localhost:2000/parameter/${key}`) const response = await fetch(`http://localhost:2000/parameter/${key}`)
return await response.json() return await response.json()
} catch (error) { // Try again, to deal with Mac race-conditions } catch (error) { // Try again, to deal with Mac race-conditions
if (previousTries <= 2) { if (previousTries <= 5) {
return fetchParam(key, previousTries = previousTries + 1) return fetchParam(key, previousTries = previousTries + 1)
} else { } else {
throw error throw error
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment