fix: stall on "starting new singleton" on linux if keychain blocks (#187182)

Adds a 5s timeout to keychain access on Linux. We had an issue about this a long time ago, but I never repro'd it until today and can't find the original...

If this timeout is hit, it'll fall back to the file-based keychain.
This commit is contained in:
Connor Peet
2023-07-06 14:49:31 -07:00
committed by GitHub
parent eec239dc35
commit 30fde0d369
2 changed files with 59 additions and 31 deletions

View File

@@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
use crate::{
use crate::{
constants::{APPLICATION_NAME, CONTROL_PORT, DOCUMENTATION_URL, QUALITYLESS_PRODUCT_NAME},
rpc::ResponseError,
};
@@ -511,6 +511,8 @@ pub enum CodeError {
AuthChallengeNotIssued,
#[error("unauthorized client refused")]
AuthMismatch,
#[error("keyring communication timed out after 5s")]
KeyringTimeout,
}
makeAnyError!(