From c5f2aba9b20089f184ce175b58a33a881ea9e0b1 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: 星期五, 16 四月 2021 18:23:13 +0800 Subject: [PATCH] 修复 流已经关闭后,再次调用关闭流的接口,返回超时 --- src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java | 12 ++++++------ 1 files changed, 6 insertions(+), 6 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..4e2561c 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,21 +49,22 @@ 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()); - 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