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)) {