/** * Stops the server, i.e., unbinds it from all ports. Frees as much system * resources as possible to still be able to be re-started with the previous binds. */ @Override public void stop() { LOGGER.info("Stopping server"); for (Endpoint ep:endpoints) ep.stop(); }
/** * Stops the server, i.e., unbinds it from all ports. Frees as much system * resources as possible to still be able to be re-started with the previous binds. */ @Override public synchronized void stop() { if (running) { LOGGER.info("Stopping server"); for (Endpoint ep : endpoints) { ep.stop(); } running = false; } }