13
0
geforkt von Mirrors/Velocity

Move proxy shutdown to take place in a new thread.

Dieser Commit ist enthalten in:
Andrew Steinborn 2019-05-23 15:09:11 -04:00
Ursprung df7eb4ade0
Commit 3cee15a9cb

Datei anzeigen

@ -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() {