public void run()

in nailgun-server/src/main/java/com/facebook/nailgun/NGServer.java [510:532]


    public void run() {

      int count = 0;
      server.shutdown();

      // give the server up to five seconds to stop.  is that enough?
      // remember that the shutdown will call nailShutdown in any
      // nails as well
      while (server.isRunning() && (count < 50)) {

        try {
          Thread.sleep(100);
        } catch (InterruptedException e) {
        }
        ++count;
      }

      if (server.isRunning()) {
        System.err.println("Unable to cleanly shutdown server.  Exiting JVM Anyway.");
      } else {
        System.out.println("NGServer shut down.");
      }
    }