WANG 5 роки тому
батько
коміт
a85558e8ac

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