From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Tue, 23 Mar 2021 11:05:22 +0000 (+0000) Subject: Make the garbage collection timeout an hour. X-Git-Tag: 1.1-dev~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7ed1db3325f955a45ebf57154f19a5df856fcc5;p=thirdparty%2Fnqptp.git Make the garbage collection timeout an hour. --- diff --git a/nqptp.c b/nqptp.c index c50458d..3e5ec5c 100644 --- a/nqptp.c +++ b/nqptp.c @@ -235,7 +235,8 @@ void deleteObseleteClockRecords(struct ptpSource **list, uint64_t time_now) { int64_t time_since_last_use = time_now - p->t2; // this is the time of the last sync record debug(2, "checking record for Clock ID %" PRIx64 " at %s. Time difference is %" PRId64 ".", p->clock_id, p->ip, time_since_last_use); - if (time_since_last_use > 15000000000) { + + if (time_since_last_use > 3600000000000) { // drop them if idle for an hour debug(2, "delete record for Clock ID %" PRIx64 " at %s.", p->clock_id, p->ip); if (p->shared_clock_number != -1) { int rc = pthread_mutex_lock(&shared_memory->shm_mutex);