fortuna: sleep only if sfm svc is running
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-01-23 20:45:06 +01:00
parent 2c56d9af27
commit 5693b24ee0
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -155,11 +155,15 @@ auto Fortuna::seed_file_manager_service() -> void {
}
}
else {
std::lock_guard<std::mutex> p_ul(print_mtx);
fmt::print("[*] sfm: job running\n");
{
std::lock_guard<std::mutex> p_ul(print_mtx);
fmt::print("[*] sfm: job running\n");
}
// sleeping here assumes nothing goes wrong. should sth break, there
// will be no sleeps when trying to restart sfm in the above block
std::this_thread::sleep_until(
right_now + std::chrono::seconds(checkup_interval));
}
std::this_thread::sleep_until(right_now +
std::chrono::seconds(checkup_interval));
}
std::lock_guard<std::mutex> p_ul(print_mtx);