648540858
2022-01-13 cf23816c80771c9e22bb50d0d89feb34d2edca79
src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
@@ -34,6 +34,7 @@
        CatalogSubscribeTask catalogSubscribeTask = new CatalogSubscribeTask(device, sipCommander);
        catalogSubscribeTask.run();
        // 提前开始刷新订阅
        // TODO 使用jain sip的当时刷新订阅
        int subscribeCycleForCatalog = device.getSubscribeCycleForCatalog();
        // 设置最小值为30
        subscribeCycleForCatalog = Math.max(subscribeCycleForCatalog, 30);
@@ -46,10 +47,12 @@
        if (device == null || device.getSubscribeCycleForCatalog() < 0) {
            return false;
        }
        logger.info("移除目录订阅【{}】", device.getDeviceId());
        logger.info("移除目录订阅: {}", device.getDeviceId());
        dynamicTask.stopCron(device.getDeviceId());
        device.setSubscribeCycleForCatalog(0);
        sipCommander.catalogSubscribe(device, null, null);
        // 清空cseq计数
        return true;
    }
}