解决无法启动的问题

This commit is contained in:
swwheihei 2020-07-18 11:37:24 +08:00
parent 84cc6e092a
commit 4abeadc636

View File

@ -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<Runnable> processQueue = new LinkedBlockingQueue<Runnable>(10000);
processThreadPool = new ThreadPoolExecutor(processThreadNum,processThreadNum,
0L,TimeUnit.MILLISECONDS,processQueue,
new ThreadPoolExecutor.CallerRunsPolicy());
return processThreadPool;
}
@Bean("sipFactory")