From 41e25be5b94a651ea30aa050371fa90cb62ae740 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Thu, 21 Nov 2024 15:27:30 +0100 Subject: [PATCH] Add account switching error handling for ssh agent --- apps/desktop/src/platform/services/ssh-agent.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/desktop/src/platform/services/ssh-agent.service.ts b/apps/desktop/src/platform/services/ssh-agent.service.ts index b1d30b931b..a8a093c823 100644 --- a/apps/desktop/src/platform/services/ssh-agent.service.ts +++ b/apps/desktop/src/platform/services/ssh-agent.service.ts @@ -163,14 +163,14 @@ export class SshAgentService implements OnDestroy { ) .subscribe(); - this.accountService.activeAccount$ - .pipe(skip(1), takeUntil(this.destroy$)) - .subscribe((account) => { + this.accountService.activeAccount$.pipe(skip(1), takeUntil(this.destroy$)).subscribe({ + next: (account) => { this.logService.info("Active account changed, clearing SSH keys"); ipc.platform.sshAgent .clearKeys() .catch((e) => this.logService.error("Failed to clear SSH keys", e)); - }); + }, + }); combineLatest([ timer(0, this.SSH_REFRESH_INTERVAL),