Skip to content

Commit

Permalink
improve youngest key search
Browse files Browse the repository at this point in the history
  • Loading branch information
testfirstcoder committed Aug 16, 2024
1 parent e9860c6 commit fc343ee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ internal bool IsKeyRotationRequired(IEnumerable<KeyContainer> allKeys)
{
// there are younger keys, then they might also be within the window of the key activation delay
// so find the youngest one and treat that one as if it's the active key.
activeKey = keys.OrderByDescending(x => x.Created).First();
activeKey = keys.MaxBy(x => x.Created);
}

// if no younger keys, then check if we're nearing the expiration of active key
Expand Down

0 comments on commit fc343ee

Please sign in to comment.