Add account switching error handling for ssh agent
This commit is contained in:
parent
6435845438
commit
41e25be5b9
|
@ -163,14 +163,14 @@ export class SshAgentService implements OnDestroy {
|
||||||
)
|
)
|
||||||
.subscribe();
|
.subscribe();
|
||||||
|
|
||||||
this.accountService.activeAccount$
|
this.accountService.activeAccount$.pipe(skip(1), takeUntil(this.destroy$)).subscribe({
|
||||||
.pipe(skip(1), takeUntil(this.destroy$))
|
next: (account) => {
|
||||||
.subscribe((account) => {
|
|
||||||
this.logService.info("Active account changed, clearing SSH keys");
|
this.logService.info("Active account changed, clearing SSH keys");
|
||||||
ipc.platform.sshAgent
|
ipc.platform.sshAgent
|
||||||
.clearKeys()
|
.clearKeys()
|
||||||
.catch((e) => this.logService.error("Failed to clear SSH keys", e));
|
.catch((e) => this.logService.error("Failed to clear SSH keys", e));
|
||||||
});
|
},
|
||||||
|
});
|
||||||
|
|
||||||
combineLatest([
|
combineLatest([
|
||||||
timer(0, this.SSH_REFRESH_INTERVAL),
|
timer(0, this.SSH_REFRESH_INTERVAL),
|
||||||
|
|
Loading…
Reference in New Issue