Merge pull request #323 from lucko/fix/shutdown-event-order

Fire ProxyShutdownEvent before closing the scheduler / event bus
This commit is contained in:
Andrew Steinborn
2020-06-29 11:18:09 -04:00
committed by GitHub

View File

@@ -409,6 +409,8 @@ public class VelocityServer implements ProxyServer {
timedOut = true;
}
eventManager.fireShutdownEvent();
timedOut = !eventManager.shutdown() || timedOut;
timedOut = !scheduler.shutdown() || timedOut;
@@ -420,8 +422,6 @@ public class VelocityServer implements ProxyServer {
Thread.currentThread().interrupt();
}
eventManager.fireShutdownEvent();
shutdown = true;
if (explicitExit) {