diff --git a/src/main/java/org/cryptomator/ui/keyloading/hub/ReceiveKeyController.java b/src/main/java/org/cryptomator/ui/keyloading/hub/ReceiveKeyController.java index ee584b764..be4c3b791 100644 --- a/src/main/java/org/cryptomator/ui/keyloading/hub/ReceiveKeyController.java +++ b/src/main/java/org/cryptomator/ui/keyloading/hub/ReceiveKeyController.java @@ -70,7 +70,7 @@ public class ReceiveKeyController implements FxController { .build(); httpClient.sendAsync(request, HttpResponse.BodyHandlers.ofInputStream()) // .thenAcceptAsync(this::loadedExistingKey, Platform::runLater) // - .exceptionallyAsync(this::retrievalFailed, Platform::runLater); + .exceptionally(this::retrievalFailed); } private void loadedExistingKey(HttpResponse response) { diff --git a/src/main/java/org/cryptomator/ui/keyloading/hub/RegisterDeviceController.java b/src/main/java/org/cryptomator/ui/keyloading/hub/RegisterDeviceController.java index 721573755..890ae55a0 100644 --- a/src/main/java/org/cryptomator/ui/keyloading/hub/RegisterDeviceController.java +++ b/src/main/java/org/cryptomator/ui/keyloading/hub/RegisterDeviceController.java @@ -76,7 +76,7 @@ public class RegisterDeviceController implements FxController { .build(); httpClient.sendAsync(request, HttpResponse.BodyHandlers.discarding()) // .thenAcceptAsync(this::registrationSucceeded, Platform::runLater) // - .exceptionallyAsync(this::registrationFailed, Platform::runLater); + .exceptionally(this::registrationFailed); } private void registrationSucceeded(HttpResponse voidHttpResponse) {