From 78cf5a5c91df332f3842d1687e631e39fe73cdc8 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Mon, 23 Aug 2021 15:34:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20#1?= =?UTF-8?q?006043=EF=BC=9B#1006059=20=E8=A7=A3=E5=86=B3=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=8F=82=E6=95=B0=E8=AE=BE=E7=BD=AE-?= =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E9=85=8D=E7=BD=AE=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【【系统设置】-【基本设置】-修改并发数保存后提示500 error】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001006043;--bug=1006059 --user=宋天阳 【系统设置】修改并发数报错 https://www.tapd.cn/55049933/s/1037885 --- .../api/service/ApiTestEnvironmentService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiTestEnvironmentService.java b/backend/src/main/java/io/metersphere/api/service/ApiTestEnvironmentService.java index 1218cf291e..af09431f0a 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestEnvironmentService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestEnvironmentService.java @@ -340,9 +340,11 @@ public class ApiTestEnvironmentService { tcpConfigObj.put("reUseConnection", false); tcpConfigObj.put("nodelay", false); tcpConfigObj.put("closeConnection", false); - if(project.getMockTcpPort() != null && project.getMockTcpPort().intValue() != 0){ - tcpConfigObj.put("server", tcpSocket); - tcpConfigObj.put("port", project.getMockTcpPort().intValue()); + if(project != null){ + if(project.getMockTcpPort() != null && project.getMockTcpPort().intValue() != 0){ + tcpConfigObj.put("server", tcpSocket); + tcpConfigObj.put("port", project.getMockTcpPort().intValue()); + } } JSONObject object = new JSONObject();