Fix threading issue in handshake rejection alert

This commit is contained in:
Kai S. K. Engelbart 2020-09-20 09:55:07 +02:00
parent a8aa1c9ea7
commit be945fe3ee
Signed by: kske
GPG Key ID: 8BEB13EC5DF7EF13
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package envoy.client.ui.controller;
import java.time.Instant;
import java.util.logging.*;
import javafx.application.Platform;
import javafx.fxml.FXML;
import javafx.geometry.Insets;
import javafx.scene.control.*;
@ -126,5 +127,5 @@ public final class LoginScene implements EventListener {
}
@Event
private void onHandshakeRejection(HandshakeRejection evt) { new Alert(AlertType.ERROR, evt.get()).showAndWait(); }
private void onHandshakeRejection(HandshakeRejection evt) { Platform.runLater(() -> new Alert(AlertType.ERROR, evt.get()).showAndWait()); }
}