Commit 395ab10c0c231c2cfac1a17e05b3cdbc4397278e
1 parent
87914be4
Avoid sending WARNINGS if api usage value is zero
Showing
1 changed file
with
1 additions
and
1 deletions
... | ... | @@ -181,7 +181,7 @@ public class TenantApiUsageState { |
181 | 181 | long threshold = getProfileThreshold(recordKey); |
182 | 182 | long warnThreshold = getProfileWarnThreshold(recordKey); |
183 | 183 | ApiUsageStateValue tmpValue; |
184 | - if (threshold == 0 || value < warnThreshold) { | |
184 | + if (threshold == 0 || value == 0 || value < warnThreshold) { | |
185 | 185 | tmpValue = ApiUsageStateValue.ENABLED; |
186 | 186 | } else if (value < threshold) { |
187 | 187 | tmpValue = ApiUsageStateValue.WARNING; | ... | ... |