Be more aggressive about removing aircraft where we have seen only 1 message.
This commit is contained in:
parent
20407e5378
commit
1584955080
2 changed files with 5 additions and 1 deletions
3
track.c
3
track.c
|
|
@ -484,7 +484,8 @@ static void trackRemoveStaleAircraft(time_t now)
|
|||
struct aircraft *prev = NULL;
|
||||
|
||||
while(a) {
|
||||
if ((now - a->seen) > TRACK_AIRCRAFT_TTL) {
|
||||
if ((now - a->seen) > TRACK_AIRCRAFT_TTL ||
|
||||
(a->messages == 1 && (now - a->seen) > TRACK_AIRCRAFT_ONEHIT_TTL)) {
|
||||
// Remove the element from the linked list, with care
|
||||
// if we are removing the first element
|
||||
if (!prev) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue