From 5cd2e2c41b6460ea628b158e9f22b6788e99eee1 Mon Sep 17 00:00:00 2001 From: lishuyuan Date: Wed, 1 Nov 2023 15:17:28 +0800 Subject: [PATCH] =?UTF-8?q?bugfix=EF=BC=9A=E8=AE=BE=E5=A4=87=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E5=8F=98=E5=8C=96=E4=BC=9A=E5=BC=95=E8=B5=B7=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E8=AE=A2=E9=98=85=E4=BB=BB=E5=8A=A1=E5=A4=B1=E6=95=88?= =?UTF-8?q?=EF=BC=8C=E9=9C=80=E8=A6=81=E9=87=8D=E6=96=B0=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../message/notify/cmd/KeepaliveNotifyMessageHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/KeepaliveNotifyMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/KeepaliveNotifyMessageHandler.java index 7d94787e..6a176006 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/KeepaliveNotifyMessageHandler.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/KeepaliveNotifyMessageHandler.java @@ -80,6 +80,11 @@ public class KeepaliveNotifyMessageHandler extends SIPRequestProcessorParent imp device.setPort(remoteAddressInfo.getPort()); device.setHostAddress(remoteAddressInfo.getIp().concat(":").concat(String.valueOf(remoteAddressInfo.getPort()))); device.setIp(remoteAddressInfo.getIp()); + // 设备地址变化会引起目录订阅任务失效,需要重新添加 + if (device.getSubscribeCycleForCatalog() > 0) { + deviceService.removeCatalogSubscribe(device); + deviceService.addCatalogSubscribe(device); + } } if (device.getKeepaliveTime() == null) { device.setKeepaliveIntervalTime(60);