fix: use proper ServerUtils for the availability check

This commit is contained in:
Zhongheng Liu 2025-12-04 17:00:49 +01:00
commit bc3744aee5
Signed by: steven
GPG key ID: F69B980899C1C09D

View file

@ -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);