From f6ca37167640bde0f2a192e5b18473b2bed538a3 Mon Sep 17 00:00:00 2001 From: zapashcanon Date: Sun, 8 Jan 2023 04:22:28 +0100 Subject: [PATCH] do not call regularly_call_fun twice as second call will overwrite the first one... --- src/pellest.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pellest.ml b/src/pellest.ml index 97ce928..9ee23fa 100644 --- a/src/pellest.ml +++ b/src/pellest.ml @@ -14,10 +14,12 @@ let update_online_user_state () = (fun _user_id state -> Some (Shared.State.auto_update state)) User.state_ht +let to_repeat () = + update_online_user_state (); + update_offline_user_state () + let () = - regularly_call_fun update_online_user_state - (Shared.Time.s_to_float Shared.State.auto_update_rate); - regularly_call_fun update_offline_user_state + regularly_call_fun to_repeat (Shared.Time.s_to_float Shared.State.auto_update_rate) let () =