From 30896332114354fafc365f6d6268cdce34dff974 Mon Sep 17 00:00:00 2001 From: desbma Date: Sun, 24 Jul 2016 21:35:14 +0200 Subject: [PATCH] Fix temp query interval too short when all drives are sleeping --- hddfancontrol/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hddfancontrol/__init__.py b/hddfancontrol/__init__.py index dd31ce9..4938f86 100755 --- a/hddfancontrol/__init__.py +++ b/hddfancontrol/__init__.py @@ -594,8 +594,8 @@ def main(drive_filepaths, fan_pwm_filepaths, fan_start_values, fan_stop_values, if any(map(operator.attrgetter("startup"), fans)): # at least one fan is starting up, quickly cancel startup boost current_interval_s = min(10, interval_s) - elif (now - drives_startup_time) < (60 * 5): - # if all drives were started or waken up less than 5 min ago, dont' sleep too long because they + elif any(awakes) and ((now - drives_startup_time) < (60 * 5)): + # if at least a drive was started or waken up less than 5 min ago, dont' sleep too long because it # can heat up quickly current_interval_s = min(20, interval_s) else: