Commit 7a52db4e89b5d87ea7db0c48748571dac8e78002

Authored by 648540858
Committed by GitHub
2 parents 083523d2 5cd2e2c4

Merge pull request #1138 from shuxiaoyuan/fix-subscribe-catalog

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