WANG 5 年之前
父節點
當前提交
a85558e8ac
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/main/java/cn/com/qmth/examcloud/web/interceptor/ApiFlowLimitedInterceptor.java

+ 4 - 0
src/main/java/cn/com/qmth/examcloud/web/interceptor/ApiFlowLimitedInterceptor.java

@@ -83,10 +83,12 @@ public class ApiFlowLimitedInterceptor implements HandlerInterceptor {
 
 				if (curPermitsPerSecond < 0) {
 					LOG.error("value is less than 0. key= " + key);
+					continue;
 				}
 
 				if (curPermitsPerSecond > 10000) {
 					LOG.error("value is more than 10000. key= " + key);
+					continue;
 				}
 
 				RateLimiter curRateLimiter = RateLimiter.create(curPermitsPerSecond);
@@ -117,10 +119,12 @@ public class ApiFlowLimitedInterceptor implements HandlerInterceptor {
 
 						if (curPermitsPerSecond < 0) {
 							LOG.error("value is less than 0. key= " + key);
+							continue;
 						}
 
 						if (curPermitsPerSecond > 10000) {
 							LOG.error("value is more than 10000. key= " + key);
+							continue;
 						}
 
 						if (!value.equals(curPermitsPerSecond)) {