summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2014-03-19 08:38:35 +0100
committerJames Moger <james.moger@gitblit.com>2014-04-10 18:58:09 -0400
commite1dbd00bf504d8ebadeb8f3f590f16d7750aaf85 (patch)
tree87e5c4ab7a82176b7b465890030d1755fc88329f /src/main
parent633d4c7a0cdf0b5eb2b01abfc6a058ac27e86d21 (diff)
downloadgitblit-e1dbd00bf504d8ebadeb8f3f590f16d7750aaf85.tar.gz
gitblit-e1dbd00bf504d8ebadeb8f3f590f16d7750aaf85.zip
Expose new property: sshCommandStartThreads
Diffstat (limited to 'src/main')
-rw-r--r--src/main/distrib/data/gitblit.properties6
-rw-r--r--src/main/java/com/gitblit/transport/ssh/commands/SshCommandFactory.java3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/main/distrib/data/gitblit.properties b/src/main/distrib/data/gitblit.properties
index 762344b4..1a613e25 100644
--- a/src/main/distrib/data/gitblit.properties
+++ b/src/main/distrib/data/gitblit.properties
@@ -129,6 +129,12 @@ git.sshKeysFolder= ${baseFolder}/ssh
# SINCE 1.5.0
git.sshBackend = NIO2
+# Number of thread for starting SSH commands.
+#
+# SINCE 1.5.0
+git.sshCommandStartThreads = 2
+
+
# Allow push/pull over http/https with JGit servlet.
# If you do NOT want to allow Git clients to clone/push to Gitblit set this
# to false. You might want to do this if you are only using ssh:// or git://.
diff --git a/src/main/java/com/gitblit/transport/ssh/commands/SshCommandFactory.java b/src/main/java/com/gitblit/transport/ssh/commands/SshCommandFactory.java
index 8f7144de..55090fcf 100644
--- a/src/main/java/com/gitblit/transport/ssh/commands/SshCommandFactory.java
+++ b/src/main/java/com/gitblit/transport/ssh/commands/SshCommandFactory.java
@@ -36,6 +36,7 @@ import org.apache.sshd.server.session.ServerSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.gitblit.Keys;
import com.gitblit.manager.IGitblit;
import com.gitblit.transport.ssh.SshDaemonClient;
import com.gitblit.utils.IdGenerator;
@@ -58,7 +59,7 @@ public class SshCommandFactory implements CommandFactory {
public SshCommandFactory(IGitblit gitblit, IdGenerator idGenerator) {
this.gitblit = gitblit;
- int threads = 2;// cfg.getInt("sshd","commandStartThreads", 2);
+ int threads = gitblit.getSettings().getInteger(Keys.git.sshCommandStartThreads, 2);
WorkQueue workQueue = new WorkQueue(idGenerator);
startExecutor = workQueue.createQueue(threads, "SshCommandStart");
destroyExecutor = Executors.newSingleThreadExecutor(