From bb49f1f0d622e2a4380a80eff93f779409b36b30 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 10 二月 2023 15:33:00 +0800
Subject: [PATCH] 添加文档
---
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
index 9113268..94646bb 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
@@ -30,7 +30,6 @@
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
-import org.springframework.util.StringUtils;
import javax.sip.InvalidArgumentException;
import javax.sip.RequestEvent;
@@ -76,8 +75,6 @@
@Autowired
private IDeviceChannelService deviceChannelService;
- private boolean taskQueueHandlerRun = false;
-
private ConcurrentLinkedQueue<HandlerCatchData> taskQueue = new ConcurrentLinkedQueue<>();
@Qualifier("taskExecutor")
@@ -97,9 +94,9 @@
}catch (SipException | InvalidArgumentException | ParseException e) {
e.printStackTrace();
}
+ boolean runed = !taskQueue.isEmpty();
taskQueue.offer(new HandlerCatchData(evt, null, null));
- if (!taskQueueHandlerRun) {
- taskQueueHandlerRun = true;
+ if (!runed) {
taskExecutor.execute(()-> {
try {
while (!taskQueue.isEmpty()) {
@@ -130,8 +127,6 @@
}
}catch (Exception e) {
logger.error("澶勭悊NOTIFY娑堟伅鏃堕敊璇�", e);
- }finally {
- taskQueueHandlerRun = false;
}
});
}
--
Gitblit v1.8.0