package pro.simpleproject.core.intra.server;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ServerExecutor {

	private static ExecutorService executor = Executors.newSingleThreadExecutor();

	private static Server server;

	public static void run(int port) {
		if (server == null) {
			executor.execute(() -> {
				try {
					server = new Server(port);
					server.run();
				} catch (Exception e) {
					e.printStackTrace();
				}
			});
		}
	}

	public static void close() {
		if (server != null) {
			server.close();
		}
	}

}

@@ -565,18 +565,41 @@
 lose();%0A%09%09%7D%0A
+%09%09executor.shutdown();%0A
 %09%7D%0A%0A%7D%0A

Update ServerExecutor.java