Move proxy shutdown to take place in a new thread.
This commit is contained in:
@@ -355,6 +355,8 @@ public class VelocityServer implements ProxyServer {
|
||||
if (!shutdownInProgress.compareAndSet(false, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Runnable shutdownProcess = () -> {
|
||||
logger.info("Shutting down the proxy...");
|
||||
|
||||
for (ConnectedPlayer player : ImmutableList.copyOf(connectionsByUuid.values())) {
|
||||
@@ -379,6 +381,10 @@ public class VelocityServer implements ProxyServer {
|
||||
if (explicitExit) {
|
||||
System.exit(0);
|
||||
}
|
||||
};
|
||||
|
||||
Thread thread = new Thread(shutdownProcess);
|
||||
thread.start();
|
||||
}
|
||||
|
||||
public NettyHttpClient getHttpClient() {
|
||||
|
Reference in New Issue
Block a user