[FIX] ServerWrapper shutdown fix

This commit is contained in:
Gravita 2022-04-12 18:46:58 +07:00
parent 8379a6efec
commit bf1967f32b
2 changed files with 10 additions and 3 deletions

View file

@ -25,11 +25,19 @@
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;
public abstract class ClientJSONPoint {
private static final EventLoopGroup group = new NioEventLoopGroup();
private static final AtomicInteger counter = new AtomicInteger();
private static final ThreadFactory threadFactory = (runnable) -> {
Thread t = new Thread(runnable);
t.setName(String.format("Netty Thread #%d", counter.incrementAndGet()));
t.setDaemon(true);
return t;
};
private static final EventLoopGroup group = new NioEventLoopGroup(threadFactory);
@LauncherInject("launcher.certificatePinning")
private static boolean isCertificatePinning;
protected final Bootstrap bootstrap = new Bootstrap();

View file

@ -180,7 +180,6 @@ public void run(String... args) throws Throwable {
LogHelper.error(e);
System.exit(-1);
}
System.exit(0);
}
public void updateLauncherConfig() {