Fix the state of CTRL+C shutdowns

This commit is contained in:
ME1312 2022-11-12 22:40:43 -05:00
parent cb6d30c882
commit d8463e25c5
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8

View File

@ -557,7 +557,10 @@ public final class SubProxy extends BungeeCommon implements Listener {
}
ukeys.clear();
if (!posted) Runtime.getRuntime().addShutdownHook(new Thread(this::shutdown, "SubServers.Bungee::System_Shutdown"));
if (!posted) Runtime.getRuntime().addShutdownHook(new Thread(() -> {
shutdown = true;
shutdown();
}, "SubServers.Bungee::System_Shutdown"));
running = ready = true;
legServers.clear();