From 76105aa27555ddbfc6e862d3177ba0d4bc3a7026 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Thu, 14 Nov 2024 19:56:39 +0100 Subject: [PATCH] Fix double prompt when unlocking by ssh request (#12000) --- apps/desktop/src/platform/services/ssh-agent.service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/platform/services/ssh-agent.service.ts b/apps/desktop/src/platform/services/ssh-agent.service.ts index dd518a943b8..fdd86788ed5 100644 --- a/apps/desktop/src/platform/services/ssh-agent.service.ts +++ b/apps/desktop/src/platform/services/ssh-agent.service.ts @@ -37,7 +37,7 @@ import { DesktopSettingsService } from "./desktop-settings.service"; }) export class SshAgentService implements OnDestroy { SSH_REFRESH_INTERVAL = 1000; - SSH_VAULT_UNLOCK_REQUEST_TIMEOUT = 1000 * 60; + SSH_VAULT_UNLOCK_REQUEST_TIMEOUT = 60_000; SSH_REQUEST_UNLOCK_POLLING_INTERVAL = 100; private destroy$ = new Subject(); @@ -79,7 +79,9 @@ export class SshAgentService implements OnDestroy { }); return this.authService.activeAccountStatus$.pipe( filter((status) => status === AuthenticationStatus.Unlocked), - timeout(this.SSH_VAULT_UNLOCK_REQUEST_TIMEOUT), + timeout({ + first: this.SSH_VAULT_UNLOCK_REQUEST_TIMEOUT, + }), catchError((error: unknown) => { if (error instanceof TimeoutError) { this.toastService.showToast({