fix: not shutting down executor service after game launched.

This commit is contained in:
huanghongxun
2020-03-31 21:54:00 +08:00
parent cbc85dd99e
commit d00b269786
3 changed files with 7 additions and 3 deletions

View File

@@ -507,12 +507,14 @@ public final class LauncherHelper {
});
break;
case HIDE:
launchingLatch.countDown();
Platform.runLater(() -> {
// If application was stopped and execution services did not finish termination,
// these codes will be executed.
if (Controllers.getStage() != null) {
Controllers.getStage().close();
launchingLatch.countDown();
Controllers.shutdown();
Schedulers.shutdown();
}
});
break;