Server thread stops when window has been closed

This commit is contained in:
Michael Rausch
2017-05-04 12:35:36 +12:00
parent e37b244f45
commit 8521b68855
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1,7 +1,6 @@
package seng302; package seng302;
import javafx.application.Application; import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.scene.Parent; import javafx.scene.Parent;
import javafx.scene.Scene; import javafx.scene.Scene;
@@ -20,8 +19,9 @@ public class App extends Application
primaryStage.setMaximized(true); primaryStage.setMaximized(true);
primaryStage.show(); primaryStage.show();
primaryStage.setOnCloseRequest(e -> { primaryStage.setOnCloseRequest(e -> {
Platform.exit(); System.exit(0);
}); });
} }