From b05ddb2003bb8510694d433c33c6ae09ee94e140 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期三, 10 三月 2021 20:43:29 +0800 Subject: [PATCH] Merge pull request #64 from lawrencehj/wvp-28181-2.0 --- src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java | 9 +++++---- 1 files changed, 5 insertions(+), 4 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..a52a925 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; @@ -52,18 +51,20 @@ } ParentPlatform parentPlatform = storager.queryParentPlatById(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()); publisher.platformNotRegisterEventPublish(event.getPlatformGbID()); + parentPlatformCatch.setKeepAliveReply(0); }else { // 鍐嶆鍙戦�佸績璺� String callId = sipCommanderForPlatform.keepalive(parentPlatform); -- Gitblit v1.8.0