解决设备上线停止线程导致的报错,优化录像的获取以及通道的更新

This commit is contained in:
648540858
2022-06-03 16:24:11 +08:00
parent d88c95f409
commit 47abdde339
11 changed files with 331 additions and 189 deletions

View File

@@ -206,6 +206,11 @@ public class DeviceQuery {
Set<String> allKeys = dynamicTask.getAllKeys();
for (String key : allKeys) {
if (key.startsWith(deviceId)) {
Runnable runnable = dynamicTask.get(key);
if (runnable instanceof ISubscribeTask) {
ISubscribeTask subscribeTask = (ISubscribeTask) runnable;
subscribeTask.stop();
}
dynamicTask.stop(key);
}
}