Commit 5cd2e2c41b6460ea628b158e9f22b6788e99eee1

Authored by lishuyuan
1 parent f4f3e60a

bugfix:设备地址变化会引起目录订阅任务失效,需要重新添加

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 @@ -80,6 +80,11 @@ public class KeepaliveNotifyMessageHandler extends SIPRequestProcessorParent imp
80 device.setPort(remoteAddressInfo.getPort()); 80 device.setPort(remoteAddressInfo.getPort());
81 device.setHostAddress(remoteAddressInfo.getIp().concat(":").concat(String.valueOf(remoteAddressInfo.getPort()))); 81 device.setHostAddress(remoteAddressInfo.getIp().concat(":").concat(String.valueOf(remoteAddressInfo.getPort())));
82 device.setIp(remoteAddressInfo.getIp()); 82 device.setIp(remoteAddressInfo.getIp());
  83 + // 设备地址变化会引起目录订阅任务失效,需要重新添加
  84 + if (device.getSubscribeCycleForCatalog() > 0) {
  85 + deviceService.removeCatalogSubscribe(device);
  86 + deviceService.addCatalogSubscribe(device);
  87 + }
83 } 88 }
84 if (device.getKeepaliveTime() == null) { 89 if (device.getKeepaliveTime() == null) {
85 device.setKeepaliveIntervalTime(60); 90 device.setKeepaliveIntervalTime(60);