648540858
2022-08-17 470aa479695a7821ef58457db9bd44dabba4acbf
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/RecordInfoResponseMessageHandler.java
@@ -40,9 +40,7 @@
public class RecordInfoResponseMessageHandler extends SIPRequestProcessorParent implements InitializingBean, IMessageHandler {
    private Logger logger = LoggerFactory.getLogger(RecordInfoResponseMessageHandler.class);
    public static volatile List<String> threadNameList = new ArrayList();
    private final String cmdType = "RecordInfo";
    private final static String CACHE_RECORDINFO_KEY = "CACHE_RECORDINFO_";
    private ConcurrentLinkedQueue<HandlerCatchData> taskQueue = new ConcurrentLinkedQueue<>();
@@ -78,8 +76,8 @@
            if (!taskQueueHandlerRun) {
                taskQueueHandlerRun = true;
                taskExecutor.execute(()->{
                    try {
                        while (!taskQueue.isEmpty()) {
                    while (!taskQueue.isEmpty()) {
                        try {
                            HandlerCatchData take = taskQueue.poll();
                            Element rootElementForCharset = getRootElement(take.getEvt(), take.getDevice().getCharset());
                            String sn = getText(rootElementForCharset, "SN");
@@ -143,10 +141,11 @@
                                    releaseRequest(take.getDevice().getDeviceId(), sn);
                                }
                            }
                        } catch (DocumentException e) {
                            throw new RuntimeException(e);
                        } finally {
                            taskQueueHandlerRun = false;
                        }
                        taskQueueHandlerRun = false;
                    }catch (DocumentException e) {
                        throw new RuntimeException(e);
                    }
                });
            }
@@ -157,6 +156,8 @@
            e.printStackTrace();
        } catch (ParseException e) {
            e.printStackTrace();
        }finally {
            taskQueueHandlerRun = false;
        }
    }