fix(应用设置): tcp端口修改失败

This commit is contained in:
shiziyuan9527 2022-03-23 14:28:28 +08:00 committed by 刘瑞斌
parent b90ed1691f
commit 26a7be69b7
1 changed files with 2 additions and 2 deletions

View File

@ -767,7 +767,7 @@ public class ProjectService {
} else {
ProjectConfig config = projectApplicationService.getSpecificTypeValue(project.getId(), ProjectApplicationType.MOCK_TCP_PORT.name());
Integer mockPort = config.getMockTcpPort();
if (mockPort == null || mockPort != 0) {
if (mockPort == null) {
MSException.throwException("Mock tcp port is not Found!");
} else {
TCPPool.createTcp(mockPort);
@ -791,7 +791,7 @@ public class ProjectService {
} else {
ProjectConfig config = projectApplicationService.getSpecificTypeValue(project.getId(), ProjectApplicationType.MOCK_TCP_PORT.name());
Integer mockPort = config.getMockTcpPort();
if (mockPort == null || mockPort != 0) {
if (mockPort == null) {
MSException.throwException("Mock tcp port is not Found!");
} else {
this.closeMockTcp(mockPort);