Skip to content

Commit

Permalink
Fixed an issue where the maximum number of anti-fragile plug-ins impl…
Browse files Browse the repository at this point in the history
…emented by default in Nacos is one more than the actual number of connections. (#11636)
  • Loading branch information
Happy-26 authored Jan 17, 2024
1 parent f5d72a3 commit 30a5014
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public ConnectionCheckResponse check(ConnectionCheckRequest connectionCheckReque
Map<String, Integer> metricsTotalCount = metricsCollectorList.stream().collect(
Collectors.toMap(ConnectionMetricsCollector::getName, ConnectionMetricsCollector::getTotalCount));
int totalCount = metricsTotalCount.values().stream().mapToInt(Integer::intValue).sum();
if (totalCount > totalCountLimit) {
if (totalCount >= totalCountLimit) {
connectionCheckResponse.setSuccess(false);
connectionCheckResponse.setCode(ConnectionCheckCode.DENY_BY_TOTAL_OVER);
}
Expand Down

0 comments on commit 30a5014

Please sign in to comment.