解决无法启动的问题
This commit is contained in:
parent
84cc6e092a
commit
4abeadc636
@ -54,14 +54,14 @@ public class SipLayer implements SipListener {
|
|||||||
private ThreadPoolExecutor processThreadPool;
|
private ThreadPoolExecutor processThreadPool;
|
||||||
|
|
||||||
@Bean("initSipServer")
|
@Bean("initSipServer")
|
||||||
@DependsOn("allOffline")
|
private ThreadPoolExecutor initSipServer() {
|
||||||
private void initSipServer() {
|
|
||||||
|
|
||||||
int processThreadNum = Runtime.getRuntime().availableProcessors() * 10;
|
int processThreadNum = Runtime.getRuntime().availableProcessors() * 10;
|
||||||
LinkedBlockingQueue<Runnable> processQueue = new LinkedBlockingQueue<Runnable>(10000);
|
LinkedBlockingQueue<Runnable> processQueue = new LinkedBlockingQueue<Runnable>(10000);
|
||||||
processThreadPool = new ThreadPoolExecutor(processThreadNum,processThreadNum,
|
processThreadPool = new ThreadPoolExecutor(processThreadNum,processThreadNum,
|
||||||
0L,TimeUnit.MILLISECONDS,processQueue,
|
0L,TimeUnit.MILLISECONDS,processQueue,
|
||||||
new ThreadPoolExecutor.CallerRunsPolicy());
|
new ThreadPoolExecutor.CallerRunsPolicy());
|
||||||
|
return processThreadPool;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean("sipFactory")
|
@Bean("sipFactory")
|
||||||
|
Loading…
Reference in New Issue
Block a user