Fix maxQueueingTimeoutMs checking logic in GatewayRuleManager#isValidRule (#2609)

This commit is contained in:
解玉乾 2022-03-22 09:49:49 +08:00 committed by GitHub
parent 0bb7532425
commit ab6c9adcec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ public final class GatewayRuleManager {
|| rule.getGrade() < 0 || rule.getCount() < 0 || rule.getBurst() < 0 || rule.getControlBehavior() < 0) {
return false;
}
if (rule.getGrade() == RuleConstant.CONTROL_BEHAVIOR_RATE_LIMITER
if (rule.getControlBehavior() == RuleConstant.CONTROL_BEHAVIOR_RATE_LIMITER
&& rule.getMaxQueueingTimeoutMs() < 0) {
return false;
}