优化订阅机制,需要重新订阅时,取消命令发送后再发送订阅命令 #1273

This commit is contained in:
648540858
2024-02-20 11:11:10 +08:00
parent b079039f81
commit a9ab5c28e9
10 changed files with 75 additions and 68 deletions

View File

@@ -82,8 +82,9 @@ public class KeepaliveNotifyMessageHandler extends SIPRequestProcessorParent imp
device.setIp(remoteAddressInfo.getIp());
// 设备地址变化会引起目录订阅任务失效,需要重新添加
if (device.getSubscribeCycleForCatalog() > 0) {
deviceService.removeCatalogSubscribe(device);
deviceService.addCatalogSubscribe(device);
deviceService.removeCatalogSubscribe(device, result->{
deviceService.addCatalogSubscribe(device);
});
}
}
if (device.getKeepaliveTime() == null) {