From 344692640c0f57a6ac43552f968c76cb082b7a36 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 20 Dec 2021 10:19:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dzlm=E7=A6=BB=E7=BA=BF?= =?UTF-8?q?=E6=97=B6=E8=AF=AF=E6=8A=A5=E8=AE=BE=E5=A4=87=E7=A6=BB=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../event/offline/KeepaliveTimeoutListenerForPlatform.java | 2 +- .../iot/vmp/media/zlm/event/ZLMKeepliveTimeoutListener.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepaliveTimeoutListenerForPlatform.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepaliveTimeoutListenerForPlatform.java index 4d2b8ce4..08815682 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepaliveTimeoutListenerForPlatform.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepaliveTimeoutListenerForPlatform.java @@ -57,7 +57,7 @@ public class KeepaliveTimeoutListenerForPlatform extends KeyExpirationEventMessa String platformGBId = expiredKey.substring(PLATFORM_REGISTER_PREFIX.length(),expiredKey.length()); publisher.platformNotRegisterEventPublish(platformGBId); - }else{ + }else if (expiredKey.startsWith(KEEPLIVEKEY_PREFIX)){ String deviceId = expiredKey.substring(KEEPLIVEKEY_PREFIX.length(),expiredKey.length()); publisher.outlineEventPublish(deviceId, KEEPLIVEKEY_PREFIX); } diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMKeepliveTimeoutListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMKeepliveTimeoutListener.java index bf10ee90..eaf8bbbb 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMKeepliveTimeoutListener.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMKeepliveTimeoutListener.java @@ -58,12 +58,14 @@ public class ZLMKeepliveTimeoutListener extends KeyExpirationEventMessageListene } String mediaServerId = expiredKey.substring(KEEPLIVEKEY_PREFIX.length(),expiredKey.length()); + logger.info("[zlm心跳到期]:" + mediaServerId); // 发起http请求验证zlm是否确实无法连接,如果确实无法连接则发送离线事件,否则不作处理 MediaServerItem mediaServerItem = mediaServerService.getOne(mediaServerId); JSONObject mediaServerConfig = zlmresTfulUtils.getMediaServerConfig(mediaServerItem); if (mediaServerConfig == null) { publisher.zlmOfflineEventPublish(mediaServerId); }else { + logger.info("[zlm心跳到期]:{}验证后zlm仍在线,回复心跳信息", mediaServerId); // 添加zlm信息 mediaServerService.updateMediaServerKeepalive(mediaServerId, mediaServerConfig); }