From 82edabae456470c65fed26f04c08ff53c728f4fb Mon Sep 17 00:00:00 2001 From: Leonetienne Date: Thu, 4 Mar 2021 11:26:55 +0100 Subject: [PATCH] Fixed issue that caused the server to fall asleep too early --- Tubio/Idler.cpp | 6 +++--- Tubio/Version.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tubio/Idler.cpp b/Tubio/Idler.cpp index b7ec245..a1d7232 100644 --- a/Tubio/Idler.cpp +++ b/Tubio/Idler.cpp @@ -1,12 +1,12 @@ #include "Idler.h" #include -#define TIME_TO_FALL_ASLEEP MINUTES(5) +#define TIME_TO_FALL_ASLEEP MINUTES(3) #define SLEEP_TIME SECONDS(3) void Idler::Update() { - // Has no request been made within 3 minutes? - if (time(0) - XGControl::last_query_time > 10) + // Has no request been made within x minutes? + if (time(0) - XGControl::last_query_time > TIME_TO_FALL_ASLEEP) { // Let the processor chill for a second. // This should reduce the idling-cpu load to near 0% diff --git a/Tubio/Version.h b/Tubio/Version.h index 7b143a5..e293521 100644 --- a/Tubio/Version.h +++ b/Tubio/Version.h @@ -1,2 +1,2 @@ #pragma once -#define TUBIO_SERVER_VERSION (0.536) +#define TUBIO_SERVER_VERSION (0.537)