Skip to content

Commit

Permalink
Merge pull request #3522 from slahirucd7/choreoImprove
Browse files Browse the repository at this point in the history
[choreo] Minor improvement considering the rate-limit count zero
  • Loading branch information
slahirucd7 authored May 20, 2024
2 parents fcacbb8 + e9de39b commit 8b8fd20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adapter/internal/discovery/xds/rate_limiter_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func AddSubscriptionLevelRateLimitPolicy(policyList *types.SubscriptionPolicyLis
}

// Need not to add the Unauthenticated and Unlimited policies to the rate limiter service
if (policy.Organization == "carbon.super" && policy.Name == "Unauthenticated") || policy.DefaultLimit.RequestCount.RequestCount < 0 {
if (policy.Organization == "carbon.super" && policy.Name == "Unauthenticated") || policy.DefaultLimit.RequestCount.RequestCount <= 0 {
continue
}
rateLimitUnit, err := parseRateLimitUnitFromSubscriptionPolicy(policy.DefaultLimit.RequestCount.TimeUnit)
Expand Down

0 comments on commit 8b8fd20

Please sign in to comment.