648540858
2023-02-14 5cae58c69129631c80c611d1870c3a20721cebf4
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;
            }
         });
      }