diff --git a/src/main/java/org/cryptomator/ui/keyloading/hub/HubKeyLoadingStrategy.java b/src/main/java/org/cryptomator/ui/keyloading/hub/HubKeyLoadingStrategy.java index 9ea5e7735..71372f32a 100644 --- a/src/main/java/org/cryptomator/ui/keyloading/hub/HubKeyLoadingStrategy.java +++ b/src/main/java/org/cryptomator/ui/keyloading/hub/HubKeyLoadingStrategy.java @@ -44,6 +44,7 @@ public class HubKeyLoadingStrategy implements KeyLoadingStrategy { this.window = window; this.keychainManager = keychainManager; window.setTitle(windowTitle); + window.setOnCloseRequest(_ -> result.cancel(true)); this.authFlowScene = authFlowScene; this.noKeychainScene = noKeychainScene; this.result = result; 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 c51c7a8ab..5af479342 100644 --- a/src/main/java/org/cryptomator/ui/keyloading/hub/RegisterDeviceController.java +++ b/src/main/java/org/cryptomator/ui/keyloading/hub/RegisterDeviceController.java @@ -193,7 +193,6 @@ public class RegisterDeviceController implements FxController { } registerException.set(cause); window.setScene(registerFailedScene.get()); - result.completeExceptionally(cause); } } }