Example #1
0
  /** Stops the local server thread if it is running. */
  public void stopLocalServer() {
    if (checkLocalServer()) {
      // TODO: stopProcess (actually Process.destroy()) hangs on Macs...
      //      doesn't seem to kill the children properly
      if (!McIDASV.isMac()) {
        thread.stopProcess();
      }

      thread.interrupt();
      thread = null;
      EventBus.publish(McservEvent.STOPPED);
      logger.debug("stopped mcservl? checkLocalServer={}", checkLocalServer());
    } else {
      logger.debug("mcservl is not running.");
    }
  }