James Moger
2011-07-20 18422ea861b3e6e4ff3a2ffe3364343deb538b5d
src/com/gitblit/GitBlitServer.java
@@ -151,6 +151,9 @@
                  params.port, bindInterface));
            httpConnector.setHost(bindInterface);
         }
         if (params.port < 1024 && !isWindows()) {
            logger.warn("Gitblit needs to run with ROOT permissions for ports < 1024!");
         }
         connectors.add(httpConnector);
      }
@@ -170,6 +173,9 @@
               logger.warn(MessageFormat.format("Binding ssl connector on port {0} to {1}",
                     params.securePort, bindInterface));
               secureConnector.setHost(bindInterface);
            }
            if (params.securePort < 1024 && !isWindows()) {
               logger.warn("Gitblit needs to run with ROOT permissions for ports < 1024!");
            }
            connectors.add(secureConnector);
         } else {
@@ -255,7 +261,7 @@
    * 
    * @param useNIO
    * @param port
    * @return an http cnonector
    * @return an http connector
    */
   private static Connector createConnector(boolean useNIO, int port) {
      Connector connector;
@@ -273,6 +279,9 @@
      connector.setPort(port);
      connector.setMaxIdleTime(30000);
      if (port < 1024 && !isWindows()) {
         logger.warn("Gitblit needs to run with ROOT permissions for ports < 1024!");
      }
      return connector;
   }
@@ -308,6 +317,15 @@
   }
   /**
    * Tests to see if the operating system is Windows.
    *
    * @return true if this is a windows machine
    */
   private static boolean isWindows() {
      return System.getProperty("os.name").toLowerCase().indexOf("windows") > -1;
   }
   /**
    * The ShutdownMonitorThread opens a socket on a specified port and waits
    * for an incoming connection. When that connection is accepted a shutdown
    * message is issued to the running Jetty server.