Commit ea5a6dae authored by Florian Pagnoux's avatar Florian Pagnoux
Browse files

Improve resilience to race conditions on MAC

parent 1ef0f43f
......@@ -60,7 +60,7 @@ async function fetchParam(key, previousTries = 0) {
const response = await fetch(`http://localhost:2000/parameter/${key}`)
return await response.json()
} catch (error) { // Try again, to deal with Mac race-conditions
if (previousTries <= 2) {
if (previousTries <= 5) {
return fetchParam(key, previousTries = previousTries + 1)
} else {
throw error
......
Markdown is supported
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