From eab6f5bf53fc93b7677f541cb5dc92b13aa4243e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Matar=C3=A9?= Date: Sun, 20 Dec 2020 17:33:17 +0100 Subject: [PATCH] honour "optional:" KW on pre-run config check Should fix issue #109 --- src/thinkfan.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/thinkfan.cpp b/src/thinkfan.cpp index a6f36bd..8e55907 100644 --- a/src/thinkfan.cpp +++ b/src/thinkfan.cpp @@ -474,8 +474,7 @@ int main(int argc, char **argv) { temp_state = TemperatureState(test_cfg->num_temps()); temp_state.init(); test_cfg->init_fans(); - for (auto &sensor : test_cfg->sensors()) - sensor->read_temps(); + read_temps_safe(test_cfg->sensors()); Logger::instance().log_lvl() = old_lvl; // Own scope so the config gets destroyed before forking }