Update main.cpp

This commit is contained in:
William Katz 2021-05-06 01:50:19 -07:00 committed by GitHub
parent 840669d910
commit 9799d75ce9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,7 @@ int main(int argc, char **argv)
const unsigned long saving_freq = std::stoul(argv[2]);
if (saving_freq) //if saving frequency is 0 then auto saving is turned off
{
std::thread([&argv, saving_freq]() {
std::thread([saving_freq]() {
while (1)
{
std::this_thread::sleep_for(std::chrono::minutes(saving_freq));
@ -47,4 +47,4 @@ int main(int argc, char **argv)
app().loadConfigFile("../config.json").registerController(API).setThreadNum(std::stoul(argv[3])).enableRunAsDaemon().run();
return 0;
}
}