Don't wait(interval) after last entry

This commit is contained in:
tastytea 2018-09-20 05:45:22 +02:00
parent 257a7dbb93
commit 4297f68d41
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.6) cmake_minimum_required (VERSION 3.6)
project (mastorss project (mastorss
VERSION 0.8.0 VERSION 0.8.1
LANGUAGES CXX LANGUAGES CXX
) )

View File

@ -116,8 +116,11 @@ int main(int argc, char *argv[])
return ret; return ret;
} }
if (rit != entries.rend())
{ // Only sleep if this is not the last entry
sleep_for(seconds(config[profile]["interval"].asUInt64())); sleep_for(seconds(config[profile]["interval"].asUInt64()));
} }
}
// Write the new last_entry only if no error happened. // Write the new last_entry only if no error happened.
write_config(); write_config();