From f2982fae6f800eddcdc90854478dc0c0491d558c Mon Sep 17 00:00:00 2001 From: Nobelf <13517042@std.stei.itb.ac.id> Date: Thu, 14 Apr 2022 21:31:50 +0700 Subject: [PATCH] fix idle user bug --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 5ea2517..5eab0fb 100644 --- a/app.py +++ b/app.py @@ -32,9 +32,9 @@ def idle_check_thread(): global waiting_time while True: current_time = time.time() - if (last_msg + waiting_time) < current_time and (last_msg + waiting_time + 1) > current_time: + if (last_msg + waiting_time) < current_time and (last_msg + waiting_time + 4) > current_time: socketio.send("are you there?") - time.sleep(3) + time.sleep(5) x = threading.Thread(target=idle_check_thread) x.start() -- GitLab