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)
project (mastorss
VERSION 0.8.0
VERSION 0.8.1
LANGUAGES CXX
)

View File

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