diff --git a/etc/hotreload.js b/etc/hotreload.js index c0b42bc..34b1dd7 100644 --- a/etc/hotreload.js +++ b/etc/hotreload.js @@ -1,8 +1,19 @@ let build_id = ""; +async function fetch_until_ok(uri) +{ + while (true) { + try { + return await fetch(uri); + } catch { + + } + } +} + async function fetch_build_id() { - const response = await fetch("/build-id"); + const response = await fetch_until_ok("/build-id"); const json = await response.json(); return json.build_id; }