3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

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