Skip to content

Commit e49c9d3

Browse files
Mange API keys if agent checks in with revision that is too high
1 parent b09874d commit e49c9d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/pkg/api/handleCheckin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ func (ct *CheckinT) processPolicyDetails(ctx context.Context, zlog zerolog.Logge
11771177
// Check if the checkin revision_idx is greater than the latest available
11781178
latestRev := ct.pm.LatestRev(ctx, agent.PolicyID)
11791179
if latestRev != 0 && revisionIDX > latestRev {
1180-
return 0, opts, nil
1180+
revisionIDX = 0 // set return val to 0 so the agent gets latest available revision.
11811181
}
11821182

11831183
// Update API keys if the policy has changed, or if the revision differs.

0 commit comments

Comments
 (0)