Skip to content

Commit

Permalink
campaignd: Write config to disk even if the clock is running backwards
Browse files Browse the repository at this point in the history
  • Loading branch information
irydacea committed Oct 29, 2014
1 parent 995f680 commit 6fc0257
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/campaign_server/campaign_server.cpp
Expand Up @@ -266,7 +266,7 @@ void server::run()

const time_t cur_ts = time(NULL);
// Write config to disk every ten minutes.
if(cur_ts - last_ts >= 10*60) {
if(abs(cur_ts - last_ts) >= 10*60) {
write_config();
last_ts = cur_ts;
}
Expand Down

0 comments on commit 6fc0257

Please sign in to comment.