From b7857027d51eca627a3f092415aa2e0d3b51313c Mon Sep 17 00:00:00 2001 From: lawrencehj <1934378145@qq.com> Date: 星期二, 09 三月 2021 20:02:56 +0800 Subject: [PATCH] 去除冗余代码和死代码 --- src/main/java/com/genersoft/iot/vmp/gb28181/event/platformKeepaliveExpire/PlatformKeepaliveExpireEventLister.java | 9 ++++----- 1 files changed, 4 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..c02b7e1 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,14 +51,14 @@ } 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娆℃湭鏀跺埌蹇冭烦鍥炲, 璁剧疆骞冲彴鐘舵�佷负绂荤嚎, 寮�濮嬮噸鏂版敞鍐� -- Gitblit v1.8.0