Skip to content

Commit

Permalink
Fix timeout when desktop app is not started
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Jan 10, 2025
1 parent 2439e23 commit f1d93b6
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ export class ExtensionLockComponentService implements LockComponentService {
if (!(await firstValueFrom(this.biometricStateService.biometricUnlockEnabled$))) {
return BiometricsStatus.NotEnabledLocally;
} else {
return await this.biometricsService.getBiometricsStatusForUser(userId);
// remove after backward compatibility code for old biometrics ipc protocol is removed
const result: BiometricsStatus = (await Promise.race([
this.biometricsService.getBiometricsStatusForUser(userId),
new Promise((resolve) =>
setTimeout(() => resolve(BiometricsStatus.DesktopDisconnected), 1000),
),
])) as BiometricsStatus;
return result;
}
}),
this.userDecryptionOptionsService.userDecryptionOptionsById$(userId),
Expand Down

0 comments on commit f1d93b6

Please sign in to comment.