fix: use proper ServerUtils for the availability check
This commit is contained in:
parent
7d2cadc800
commit
bc3744aee5
1 changed files with 2 additions and 2 deletions
|
|
@ -22,9 +22,9 @@ import client.scenes.MainCtrl;
|
|||
import client.scenes.AddIngredientCtrl;
|
||||
import client.scenes.AddNameCtrl;
|
||||
import client.scenes.FoodpalApplicationCtrl;
|
||||
import client.utils.ServerUtils;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
import client.utils.ServerUtilsExample;
|
||||
import javafx.application.Application;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ public class Main extends Application {
|
|||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
|
||||
var serverUtils = INJECTOR.getInstance(ServerUtilsExample.class);
|
||||
var serverUtils = INJECTOR.getInstance(ServerUtils.class);
|
||||
if (!serverUtils.isServerAvailable()) {
|
||||
var msg = "Server needs to be started before the client, but it does not seem to be available. Shutting down.";
|
||||
System.err.println(msg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue