代码调整
This commit is contained in:
@@ -991,6 +991,8 @@ public class SocketDevResponseService {
|
||||
//在这一步判断是否已经触发暂停按钮
|
||||
if (FormalTestManager.stopFlag && CollUtil.isNotEmpty(SocketManager.getSourceList())) {
|
||||
FormalTestManager.stopTime = 0;
|
||||
FormalTestManager.hasStopFlag = true;
|
||||
|
||||
successComm.clear();
|
||||
realDataXiList.clear();
|
||||
sendWebSocket(param.getUserPageId(), "preStopTest", "stop", null);
|
||||
@@ -1228,6 +1230,8 @@ public class SocketDevResponseService {
|
||||
successDevComm.clear();
|
||||
failDevComm.clear();
|
||||
FormalTestManager.stopFlag = false;
|
||||
FormalTestManager.hasStopFlag = false;
|
||||
FormalTestManager.stopTime = 0;
|
||||
|
||||
//初始化相序集合
|
||||
this.devInfo.clear();
|
||||
|
||||
@@ -40,8 +40,21 @@ public class FormalTestManager {
|
||||
public static Map<String, String> devIdMapComm = new HashMap<>();
|
||||
|
||||
|
||||
/**
|
||||
* 停止触发标识
|
||||
*/
|
||||
public static Boolean stopFlag = false;
|
||||
|
||||
|
||||
/**
|
||||
* 已经暂停后的标识
|
||||
*/
|
||||
public static Boolean hasStopFlag = false;
|
||||
|
||||
|
||||
/**
|
||||
* 暂停后的超时计时时间
|
||||
*/
|
||||
public static Integer stopTime = 0;
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ public class NettyDevClientHandler extends SimpleChannelInboundHandler<String> {
|
||||
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) {
|
||||
if (evt instanceof IdleStateEvent) {
|
||||
if (((IdleStateEvent) evt).state() == IdleState.READER_IDLE) {
|
||||
if(!FormalTestManager.stopFlag) {
|
||||
if(!FormalTestManager.hasStopFlag) {
|
||||
if (CollUtil.isNotEmpty(SocketManager.getSourceList())) {
|
||||
SourceIssue sourceIssue = SocketManager.getSourceList().get(0);
|
||||
if (SocketManager.clockMap.containsKey(sourceIssue.getIndex())) {
|
||||
|
||||
Reference in New Issue
Block a user