mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user