Skip to content

Commit

Permalink
--write-state-only-on-exit: still write range outline state every 6h
Browse files Browse the repository at this point in the history
previous behaviour: don't write it at all
without the option the interval is 5 min, not changed
  • Loading branch information
wiedehopf committed Mar 5, 2024
1 parent e391049 commit 1e32ea6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions readsb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2299,12 +2299,13 @@ static void miscStuff(int64_t now) {
nextOutlineWrite = now + 15 * SECONDS;
}

if (!Modes.state_only_on_exit) {
static int64_t nextRangeDirsWrite;
if (now > nextRangeDirsWrite) {
nextRangeDirsWrite = now + 5 * MINUTES;
writeRangeDirs();
static int64_t nextRangeDirsWrite;
if (now > nextRangeDirsWrite) {
nextRangeDirsWrite = now + 5 * MINUTES;
if (Modes.state_only_on_exit) {
nextRangeDirsWrite = now + 6 * HOURS;
}
writeRangeDirs();
}
}

Expand Down

0 comments on commit 1e32ea6

Please sign in to comment.