From 4abeadc6364c760d0b79ca91dc8c060b2616dc23 Mon Sep 17 00:00:00 2001 From: swwheihei Date: Sat, 18 Jul 2020 11:37:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=97=A0=E6=B3=95=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java index 9cc9c25..b219f3e 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java @@ -54,14 +54,14 @@ public class SipLayer implements SipListener { private ThreadPoolExecutor processThreadPool; @Bean("initSipServer") - @DependsOn("allOffline") - private void initSipServer() { + private ThreadPoolExecutor initSipServer() { int processThreadNum = Runtime.getRuntime().availableProcessors() * 10; LinkedBlockingQueue processQueue = new LinkedBlockingQueue(10000); processThreadPool = new ThreadPoolExecutor(processThreadNum,processThreadNum, 0L,TimeUnit.MILLISECONDS,processQueue, new ThreadPoolExecutor.CallerRunsPolicy()); + return processThreadPool; } @Bean("sipFactory")