Fix javafx error on ci

This commit is contained in:
Zhi You Tan
2017-08-14 11:02:07 +12:00
parent 2093e79b6a
commit e780b47160
@@ -145,12 +145,14 @@ public class ClientToServerThread implements Runnable {
}
} catch (ByteReadException e) {
closeSocket();
if (Platform.isFxApplicationThread()) {
Platform.runLater(() -> {
Alert alert = new Alert(AlertType.ERROR);
alert.setHeaderText("Host has disconnected");
alert.setContentText("Cannot find Server");
alert.showAndWait();
});
}
clientLog(e.getMessage(), 1);
return;
}