sureshanaparti commented on code in PR #10417:
URL: https://github.com/apache/cloudstack/pull/10417#discussion_r1987182189
##########
utils/src/main/java/com/cloud/utils/nio/NioConnection.java:
##########
@@ -127,17 +129,31 @@ public void start() throws NioConnectionException {
_isStartup = true;
if (_executor.isShutdown()) {
- _executor = new ThreadPoolExecutor(_workers, 5 * _workers, 1,
TimeUnit.DAYS, new LinkedBlockingQueue<>(), new NamedThreadFactory(_name +
"-Handler"));
+ _executor = new ThreadPoolExecutor(_workers, 5 * _workers, 1,
TimeUnit.DAYS,
+ new LinkedBlockingQueue<>(5 * _workers), new
NamedThreadFactory(_name + "-Handler"),
+ new ThreadPoolExecutor.AbortPolicy());
+ }
+ if (_sslHandshakeExecutor.isShutdown()) {
+ String sslHandshakeHandlerName = _name + "-SSLHandshakeHandler";
+ if (factoryMaxNewConnectionsCount > 0) {
+ _sslHandshakeExecutor = new ThreadPoolExecutor(0,
this.factoryMaxNewConnectionsCount, 30,
+ TimeUnit.MINUTES, new SynchronousQueue<>(), new
NamedThreadFactory(sslHandshakeHandlerName),
+ new ThreadPoolExecutor.AbortPolicy());
+ } else {
+ _sslHandshakeExecutor = Executors.newCachedThreadPool(new
NamedThreadFactory(sslHandshakeHandlerName));
+ }
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]