private Optional<Socket> acceptServerSocket(ServerSocket serverSocket){
		try {
			return Optional.of(serverSocket.accept());
		} catch (final IOException e) {
			connectionPermits.release();
			// it also happens during shutdown, when the socket is closed
			if (!this.shuttingDown) {
				LOGGER.error("Error accepting connection", e);
				// prevent a possible loop causing 100% processor usage
				try {
					Thread.sleep(1000);
				} catch (final InterruptedException consumed) {
					Thread.currentThread().interrupt();
				}
			}
			return Optional.empty();
		}
	}
Accept connections and run them in session threads until shutdown.
src/main/java/de/gessnerfl/fakesmtp/smtp/server/BaseSmtpServerRunnable.java