From ab4db453b3cb74f27de2b058e8a1a5cf375cec2e Mon Sep 17 00:00:00 2001 From: Meredith Lancaster Date: Wed, 26 Jun 2024 11:15:31 -0600 Subject: [PATCH] comment Signed-off-by: Meredith Lancaster --- pkg/tuf/repo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/tuf/repo.go b/pkg/tuf/repo.go index 86495041..dda2cdd9 100644 --- a/pkg/tuf/repo.go +++ b/pkg/tuf/repo.go @@ -303,8 +303,8 @@ var ( func GetTrustedRoot(ctx context.Context) (*root.TrustedRoot, error) { resyncPeriodDuration := FromContextOrDefaults(ctx) now := time.Now().UTC() - // check if timestamp has never been or if the current time is more - // than the resync duration period after the current timestamp value + // check if timestamp has never been set or if the current time + // is after the current timestamp value plus the included resync duration if timestamp.IsZero() || now.After(timestamp.Add(resyncPeriodDuration)) { mu.Lock() defer mu.Unlock()