]> git.ipfire.org Git - thirdparty/nqptp.git/commitdiff
Make the garbage collection timeout an hour.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Tue, 23 Mar 2021 11:05:22 +0000 (11:05 +0000)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Tue, 23 Mar 2021 11:05:22 +0000 (11:05 +0000)
nqptp.c

diff --git a/nqptp.c b/nqptp.c
index c50458db85d911a4f044fd71c8bbef555582746c..3e5ec5c4c22562e1b4928cd230853b263afb7735 100644 (file)
--- 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);