This is an automated email from the ASF dual-hosted git repository.

amichair pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/aries-rsa.git

commit 2615936167cc636f09314b88ef1b17be4d12921a
Author: Amichai Rothman <[email protected]>
AuthorDate: Thu Apr 2 22:02:57 2026 +0300

    Fix increasing number of threads in TcpServer
---
 .../src/main/java/org/apache/aries/rsa/provider/tcp/TcpServer.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/provider/tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TcpServer.java 
b/provider/tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TcpServer.java
index de6f5c69..ff360eef 100644
--- 
a/provider/tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TcpServer.java
+++ 
b/provider/tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TcpServer.java
@@ -98,8 +98,8 @@ public class TcpServer implements Closeable, Runnable {
 
     public void setNumThreads(int numThreads) {
         numThreads++; // plus one for server socket accepting thread
-        executor.setCorePoolSize(numThreads);
-        executor.setMaximumPoolSize(numThreads);
+        executor.setMaximumPoolSize(numThreads); // first the max
+        executor.setCorePoolSize(numThreads); // then the size
     }
 
     public int getNumThreads() {

Reply via email to