chore: disable retry for checkUpdateComponents RPC

This commit is contained in:
Siyuan 2025-11-18 13:49:29 +00:00
parent 95be473608
commit f1eb38fd5e
2 changed files with 4 additions and 2 deletions

View File

@ -208,7 +208,6 @@ export default function SettingsAdvancedRoute() {
versionInfo = await checkUpdateComponents({
components,
}, devChannel);
console.log("versionInfo", versionInfo);
} catch (error: unknown) {
const jsonRpcError = error as JsonRpcError;
handleVersionUpdateError(jsonRpcError);

View File

@ -262,7 +262,10 @@ export async function checkUpdateComponents(params: updateParams, includePreRele
params,
includePreRelease,
},
maxAttempts: UPDATE_STATUS_RPC_MAX_ATTEMPTS,
// maxAttempts is set to 1,
// because it currently retry for all errors,
// and we don't want to retry if the error is not a network error
maxAttempts: 1,
attemptTimeoutMs: UPDATE_STATUS_RPC_TIMEOUT_MS,
});
if (response.error) throw response.error;