Commit 205f1f1f6025bc812ccb7cf2408336d956c65d1a

Authored by 648540858
1 parent c084d6c9

优化国标级联心跳失败再次注册的逻辑

src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/RecordInfoResponseMessageHandler.java
@@ -78,7 +78,6 @@ public class RecordInfoResponseMessageHandler extends SIPRequestProcessorParent @@ -78,7 +78,6 @@ public class RecordInfoResponseMessageHandler extends SIPRequestProcessorParent
78 } 78 }
79 taskExecutor.execute(()->{ 79 taskExecutor.execute(()->{
80 try { 80 try {
81 -  
82 String sn = getText(rootElement, "SN"); 81 String sn = getText(rootElement, "SN");
83 String channelId = getText(rootElement, "DeviceID"); 82 String channelId = getText(rootElement, "DeviceID");
84 RecordInfo recordInfo = new RecordInfo(); 83 RecordInfo recordInfo = new RecordInfo();
src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java
@@ -241,8 +241,11 @@ public class PlatformServiceImpl implements IPlatformService { @@ -241,8 +241,11 @@ public class PlatformServiceImpl implements IPlatformService {
241 // 此时是第三次心跳超时, 平台离线 241 // 此时是第三次心跳超时, 平台离线
242 if (platformCatch.getKeepAliveReply() == 2) { 242 if (platformCatch.getKeepAliveReply() == 2) {
243 // 设置平台离线,并重新注册 243 // 设置平台离线,并重新注册
244 - logger.info("[国标级联] 三次心跳超时, 平台{}({})离线", parentPlatform.getName(), parentPlatform.getServerGBId()); 244 + logger.info("[国标级联] 三次心跳失败, 平台{}({})离线", parentPlatform.getName(), parentPlatform.getServerGBId());
245 offline(parentPlatform, false); 245 offline(parentPlatform, false);
  246 + }else {
  247 + platformCatch.setKeepAliveReply(platformCatch.getKeepAliveReply() + 1);
  248 + redisCatchStorage.updatePlatformCatchInfo(platformCatch);
246 } 249 }
247 250
248 }, eventResult -> { 251 }, eventResult -> {