From 3ec9fbdb6fa4fab5299457b687564551f879634e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 4 Apr 2021 12:11:53 +0100 Subject: [PATCH] wdt: Fix load race With the sleep this fails before, and passes afterwards. Signed-off-by: Ian Jackson --- daemon/session.rs | 1 + templates/script.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/daemon/session.rs b/daemon/session.rs index 8ddda535..0229793f 100644 --- a/daemon/session.rs +++ b/daemon/session.rs @@ -86,6 +86,7 @@ impl SvgAttrs { fn session_inner(form: Json, layout: Option) -> Result { + sleep(Duration::from_secs(2)); // make session in this game, log a message to other players let iad = lookup_token(form.ptoken.borrow())?; let player = iad.ident; diff --git a/templates/script.ts b/templates/script.ts index 3dd0cb54..b32b36f7 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -1548,6 +1548,7 @@ function startup() { } if (gen_update_hook == null) gen_update_hook = function() { }; + gen_update_hook(); last_log_ts = wasm_bindgen.timestamp_abbreviator(dataload.last_log_ts); -- 2.30.2