Skip to content

Commit

Permalink
fix exit on hang logic not signaling exit properly
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Jul 11, 2024
1 parent 874c84e commit 1a4c123
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readsb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2875,12 +2875,12 @@ int main(int argc, char **argv) {
fprintf(stderr, "<3>FATAL: priorityTasksRun() interval %.1f seconds! Trying for an orderly shutdown as well as possible!\n", (double) elapsed1 / SECONDS);
fprintf(stderr, "<3>lockThreads() probably hung on %s\n", Modes.currentTask);
setExit(2);
break;
// don't break here, otherwise exitNowEventfd isn't signaled and we don't have a proper exit
// setExit signals exitSoonEventfd, the main loop will then signal exitNowEventfd
}
if (elapsed2 > 60 * SECONDS && !Modes.synthetic_now) {
fprintf(stderr, "<3>FATAL: removeStale() interval %.1f seconds! Trying for an orderly shutdown as well as possible!\n", (double) elapsed2 / SECONDS);
setExit(2);
break;
}
}
}
Expand Down

0 comments on commit 1a4c123

Please sign in to comment.