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({ versionInfo = await checkUpdateComponents({
components, components,
}, devChannel); }, devChannel);
console.log("versionInfo", versionInfo);
} catch (error: unknown) { } catch (error: unknown) {
const jsonRpcError = error as JsonRpcError; const jsonRpcError = error as JsonRpcError;
handleVersionUpdateError(jsonRpcError); handleVersionUpdateError(jsonRpcError);

View File

@ -262,7 +262,10 @@ export async function checkUpdateComponents(params: updateParams, includePreRele
params, params,
includePreRelease, 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, attemptTimeoutMs: UPDATE_STATUS_RPC_TIMEOUT_MS,
}); });
if (response.error) throw response.error; if (response.error) throw response.error;