public void shutdown() { logger.info("Got shutdown request..."); shuttingDown = true; killUnlessShutdownWithin(KILL_DELAY); if (simpleSocketServer != null) { try { simpleSocketServer.close(); } catch (Exception e) { logger.debug("Caught exception while shutting down simpleSocketServer. Was it not started?", e); } } else { logger.trace("simpleSocketServer was null"); } if (server != null) { try { server.shutdown(); return; } catch (Exception e) { logger.debug("Caught exception while shutting down the server. Was it not started?", e); System.exit(1); } } else { logger.trace("server was null"); } }
simpleSocketServer.close();