diff --git a/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/command/ActionCommand.java b/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/command/ActionCommand.java index e169540..7622283 100644 --- a/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/command/ActionCommand.java +++ b/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/command/ActionCommand.java @@ -72,15 +72,20 @@ public abstract class ActionCommand { Integer index){ if(baseSession.getRequestId().equals(queue.getRequestId())){ + Integer finish = YesNo.NO.getCode(); String message = ""; if(queue.getQueue().size() > 0){ message = queue.getQueue().poll(); message = StringUtils.getSendStr(sb, message, false); }else if(queue.getStatus() == YesNo.NO.getCode().intValue()){ + finish = 1; if(sb.length() == 0){ //结束了 log.info("发送结束了,请求id:{}", queue.getRequestId()); - return Mono.empty(); + return normalSendMsg(baseSession, message, type, finish, actionSendMessage, index).flatMap(b -> { + return Mono.empty(); + }); + } message = sb.toString(); message = StringUtils.removeStringChars(message); @@ -89,11 +94,11 @@ public abstract class ActionCommand { try{ Thread.sleep(10); }catch(Exception e){ - log.info("等信息信息休息异常{}", e); + log.info("等信息休息异常{}", e); } } if(StringUtils.isNotEmpty(message)){ - return normalSendMsg(baseSession, message, type, YesNo.NO.getCode(), actionSendMessage, index).flatMap(m -> { + return normalSendMsg(baseSession, message, type, finish, actionSendMessage, index).flatMap(m -> { return sendMessage(action, baseSession, queue, sb, type, actionSendMessage, index + 1); }); }