[BUG] 修复执行录像计划定时任务时,没有录像任务导致的java.util.ConcurrentModificationException
报错内容: ``` java.util.ConcurrentModificationException: null at java.util.HashMap$HashIterator.nextNode(HashMap.java:1469) at java.util.HashMap$KeyIterator.next(HashMap.java:1493) at com.genersoft.iot.vmp.service.impl.RecordPlanServiceImpl.stopStreams(RecordPlanServiceImpl.java:143) at com.genersoft.iot.vmp.service.impl.RecordPlanServiceImpl.execution(RecordPlanServiceImpl.java:92) ``` 做出的修改: 按照下面的逻辑搬上来了pull/1771/head
parent
d08248aae9
commit
d0d0776d4a
|
@ -89,7 +89,8 @@ public class RecordPlanServiceImpl implements IRecordPlanService {
|
||||||
if (startChannelIdList.isEmpty()) {
|
if (startChannelIdList.isEmpty()) {
|
||||||
// 当前没有录像任务, 如果存在旧的正在录像的就移除
|
// 当前没有录像任务, 如果存在旧的正在录像的就移除
|
||||||
if(!recordStreamMap.isEmpty()) {
|
if(!recordStreamMap.isEmpty()) {
|
||||||
stopStreams(recordStreamMap.keySet(), recordStreamMap);
|
Set<Integer> recordStreamSet = new HashSet<>(recordStreamMap.keySet());
|
||||||
|
stopStreams(recordStreamSet, recordStreamMap);
|
||||||
recordStreamMap.clear();
|
recordStreamMap.clear();
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
|
|
Loading…
Reference in New Issue