From 2c1dbe63de3d370d0b0f20fea474326e88b9ca23 Mon Sep 17 00:00:00 2001 From: lawrencehj <1934378145@qq.com> Date: 星期三, 10 三月 2021 14:39:40 +0800 Subject: [PATCH] 增加接收Bye请求后停止向上级推流功能 --- src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java | 10 +++++----- 1 files changed, 5 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 a7c786e..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,19 +51,20 @@ } ParentPlatform parentPlatform = storager.queryParentPlatById(event.getPlatformGbID()); ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(event.getPlatformGbID()); - parentPlatformCatch.setParentPlatform(parentPlatform); + 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