James Moger
2014-05-29 020f7e4b0644c5f1c5176728d722dc6254245c1c
src/main/java/com/gitblit/manager/ServicesManager.java
@@ -47,6 +47,7 @@
import com.gitblit.utils.IdGenerator;
import com.gitblit.utils.StringUtils;
import com.gitblit.utils.TimeUtils;
import com.gitblit.utils.WorkQueue;
/**
 * Services manager manages long-running services/processes that either have no
@@ -66,6 +67,10 @@
   private final IGitblit gitblit;
   private final IdGenerator idGenerator;
   private final WorkQueue workQueue;
   private FanoutService fanoutService;
   private GitDaemon gitDaemon;
@@ -75,6 +80,8 @@
   public ServicesManager(IGitblit gitblit) {
      this.settings = gitblit.getSettings();
      this.gitblit = gitblit;
      this.idGenerator = new IdGenerator();
      this.workQueue = new WorkQueue(idGenerator, 1);
   }
   @Override
@@ -99,6 +106,7 @@
      if (sshDaemon != null) {
         sshDaemon.stop();
      }
      workQueue.stop();
      return this;
   }
@@ -158,7 +166,7 @@
      String bindInterface = settings.getString(Keys.git.sshBindInterface, "localhost");
      if (port > 0) {
         try {
            sshDaemon = new SshDaemon(gitblit, new IdGenerator());
            sshDaemon = new SshDaemon(gitblit, workQueue);
            sshDaemon.start();
         } catch (IOException e) {
            sshDaemon = null;