From 4091dc8fffa338add5ebb60270dfc08e8e1557c7 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 23 Sep 2021 18:49:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96)=20=E5=A2=9E=E5=8A=A0=E6=95=B4=E4=BD=93=E5=AE=88?= =?UTF-8?q?=E6=8A=A4=E5=A4=84=E7=90=86=E9=98=B2=E6=AD=A2=E6=95=B4=E4=BD=93?= =?UTF-8?q?running?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/metersphere/api/jmeter/FixedTask.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/jmeter/FixedTask.java b/backend/src/main/java/io/metersphere/api/jmeter/FixedTask.java index 96a751aebd..b29b807434 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/FixedTask.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/FixedTask.java @@ -32,12 +32,12 @@ public class FixedTask { MessageCache.cache.remove(key); } else { try { - int number = 0; if (guardTask.containsKey(key)) { - number = guardTask.get(key); - guardTask.put(key, number++); - } else { + int number = guardTask.get(key); + number +=1; guardTask.put(key, number); + } else { + guardTask.put(key, 0); } if (CollectionUtils.isNotEmpty(counter.getPoolUrls()) && counter.getNumber() > 0 && guardTask.get(key) > 200) { // 资源池中已经没有执行的请求了