From c23a52929641484ed0b4ca728630f6d74872da8b Mon Sep 17 00:00:00 2001
From: mk1990 <153958232@qq.com>
Date: 星期一, 28 三月 2022 14:36:13 +0800
Subject: [PATCH] Merge branch 'wvp-28181-2.0' of https://github.91chi.fun/https://github.com/648540858/wvp-GB28181-pro into wvp-28181-2.0
---
src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
index f914313..0fc6f4c 100644
--- a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
@@ -30,11 +30,15 @@
if (device == null || device.getSubscribeCycleForCatalog() < 0) {
return false;
}
+ if (dynamicTask.contains(device.getDeviceId())) {
+ // 瀛樺湪鍒欏仠姝㈢幇鏈夌殑锛屽紑鍚柊鐨�
+ dynamicTask.stop(device.getDeviceId());
+ }
+ logger.info("[娣诲姞鐩綍璁㈤槄] 璁惧{}", device.getDeviceId());
// 娣诲姞鐩綍璁㈤槄
CatalogSubscribeTask catalogSubscribeTask = new CatalogSubscribeTask(device, sipCommander);
catalogSubscribeTask.run();
// 鎻愬墠寮�濮嬪埛鏂拌闃�
- // TODO 浣跨敤jain sip鐨勫綋鏃跺埛鏂拌闃�
int subscribeCycleForCatalog = device.getSubscribeCycleForCatalog();
// 璁剧疆鏈�灏忓�间负30
subscribeCycleForCatalog = Math.max(subscribeCycleForCatalog, 30);
@@ -48,7 +52,7 @@
return false;
}
logger.info("绉婚櫎鐩綍璁㈤槄: {}", device.getDeviceId());
- dynamicTask.stopCron(device.getDeviceId());
+ dynamicTask.stop(device.getDeviceId());
device.setSubscribeCycleForCatalog(0);
sipCommander.catalogSubscribe(device, null, null);
return true;
--
Gitblit v1.8.0