From e1bcda8c6245035c96bf44ee09d61fa5a52bcafc Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Thu, 29 May 2014 17:18:38 -0400 Subject: [PATCH] Merged #93 "Clarify server.threadPoolSize setting documentation" --- src/main/java/com/gitblit/transport/ssh/SshDaemon.java | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gitblit/transport/ssh/SshDaemon.java b/src/main/java/com/gitblit/transport/ssh/SshDaemon.java index 6956c12..7c51290 100644 --- a/src/main/java/com/gitblit/transport/ssh/SshDaemon.java +++ b/src/main/java/com/gitblit/transport/ssh/SshDaemon.java @@ -41,16 +41,14 @@ import com.gitblit.Keys; import com.gitblit.manager.IGitblit; import com.gitblit.transport.ssh.commands.SshCommandFactory; -import com.gitblit.utils.IdGenerator; import com.gitblit.utils.JnaUtils; import com.gitblit.utils.StringUtils; +import com.gitblit.utils.WorkQueue; import com.google.common.io.Files; /** * Manager for the ssh transport. Roughly analogous to the * {@link com.gitblit.transport.git.GitDaemon} class. - * - * @author Eric Myhre * */ public class SshDaemon { @@ -78,8 +76,9 @@ * Construct the Gitblit SSH daemon. * * @param gitblit + * @param workQueue */ - public SshDaemon(IGitblit gitblit, IdGenerator idGenerator) { + public SshDaemon(IGitblit gitblit, WorkQueue workQueue) { this.gitblit = gitblit; IStoredSettings settings = gitblit.getSettings(); @@ -128,7 +127,7 @@ sshd.setSessionFactory(new SshServerSessionFactory()); sshd.setFileSystemFactory(new DisabledFilesystemFactory()); sshd.setTcpipForwardingFilter(new NonForwardingFilter()); - sshd.setCommandFactory(new SshCommandFactory(gitblit, idGenerator)); + sshd.setCommandFactory(new SshCommandFactory(gitblit, workQueue)); sshd.setShellFactory(new WelcomeShell(settings)); // Set the server id. This can be queried with: @@ -214,8 +213,8 @@ Files.touch(file); try { JnaUtils.setFilemode(file, JnaUtils.S_IRUSR | JnaUtils.S_IWUSR); - } catch (UnsupportedOperationException e) { - // Windows + } catch (UnsatisfiedLinkError | UnsupportedOperationException e) { + // Unexpected/Unsupported OS or Architecture } FileOutputStream os = new FileOutputStream(file); -- Gitblit v1.9.1