Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
Signed-off-by: Meredith Lancaster <[email protected]>
  • Loading branch information
malancas committed Jun 26, 2024
1 parent 3ce82c1 commit ab4db45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/tuf/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ab4db45

Please sign in to comment.