From e48ef997c03b49c8090970f5fbb29ce80b0ac6df Mon Sep 17 00:00:00 2001 From: 64850858 <648540858@qq.com> Date: 星期三, 14 七月 2021 15:57:39 +0800 Subject: [PATCH] 更换播放器, 修正和优化sql脚本, --- src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java index 11f248a..480ed1d 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java @@ -2,7 +2,6 @@ import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatformCatch; -import com.genersoft.iot.vmp.gb28181.bean.PlatformRegister; import com.genersoft.iot.vmp.gb28181.event.EventPublisher; import com.genersoft.iot.vmp.gb28181.event.SipSubscribe; import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; @@ -50,20 +49,23 @@ if (logger.isDebugEnabled()) { logger.debug("骞冲彴蹇冭烦鍒版湡浜嬩欢浜嬩欢瑙﹀彂锛屽钩鍙板浗鏍嘔D锛�" + event.getPlatformGbID()); } - ParentPlatform parentPlatform = storager.queryParentPlatById(event.getPlatformGbID()); + ParentPlatform parentPlatform = storager.queryParentPlatByServerGBId(event.getPlatformGbID()); ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(event.getPlatformGbID()); + if (parentPlatformCatch == null) { + return; + } if (parentPlatform == null) { logger.debug("骞冲彴蹇冭烦鍒版湡浜嬩欢浜嬩欢瑙﹀彂锛屼絾骞冲彴宸茬粡鍒犻櫎!!! 骞冲彴鍥芥爣ID锛�" + event.getPlatformGbID()); return; } - if (parentPlatformCatch == null) { - return; - } + parentPlatformCatch.setParentPlatform(parentPlatform); // 鍙戦�佸績璺� if (parentPlatformCatch.getKeepAliveReply() >= 3) { // 鏈�3娆℃湭鏀跺埌蹇冭烦鍥炲, 璁剧疆骞冲彴鐘舵�佷负绂荤嚎, 寮�濮嬮噸鏂版敞鍐� logger.warn("鏈�3娆℃湭鏀跺埌蹇冭烦鍥炲,鏍囪璁剧疆骞冲彴鐘舵�佷负绂荤嚎, 骞堕噸鏂版敞鍐� 骞冲彴鍥芥爣ID锛�" + event.getPlatformGbID()); + storager.updateParentPlatformStatus(event.getPlatformGbID(), false); publisher.platformNotRegisterEventPublish(event.getPlatformGbID()); + parentPlatformCatch.setKeepAliveReply(0); }else { // 鍐嶆鍙戦�佸績璺� String callId = sipCommanderForPlatform.keepalive(parentPlatform); -- Gitblit v1.8.0