Refactored course boundary to be a shade rather than a line and made the stream parser and stream receiver exit gracefully before the app closes.

#story[820]
This commit is contained in:
Kusal Ekanayake
2017-05-04 13:29:53 +12:00
parent a0bb7b85b4
commit a4cc5f222c
4 changed files with 33 additions and 14 deletions
+4 -3
View File
@@ -19,8 +19,10 @@ public class App extends Application
primaryStage.setMaximized(true);
primaryStage.show();
primaryStage.setOnCloseRequest(e -> {
StreamParser.appClose();
StreamReceiver.noMoreBytes();
System.out.println("[CLIENT] Exiting program");
System.exit(0);
});
@@ -39,8 +41,7 @@ public class App extends Application
if (args.length == 3 && args[0].equals("-server")){
sr = new StreamReceiver(args[1], Integer.valueOf(args[2]), "RaceStream");
}
else if(args.length == 2 && args[0].equals("-server")){
} else if(args.length == 2 && args[0].equals("-server")){
switch (args[1]) {
case "internal":
sr = new StreamReceiver("localhost", 8085, "RaceStream");