Fix update retry: reset abort controller on early return errors
Some checks are pending
Build and Release / build (push) Waiting to run

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe 2026-03-02 18:06:11 +01:00
parent 84d5c0f13f
commit eb42fbabfd
2 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "real-debrid-downloader", "name": "real-debrid-downloader",
"version": "1.4.95", "version": "1.4.96",
"description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)", "description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)",
"main": "build/main/main/main.js", "main": "build/main/main/main.js",
"author": "Sucukdeluxe", "author": "Sucukdeluxe",

View File

@ -910,6 +910,7 @@ export async function installLatestUpdate(
: await checkGitHubUpdate(safeRepo); : await checkGitHubUpdate(safeRepo);
if (check.error) { if (check.error) {
activeUpdateAbortController = null;
safeEmitProgress(onProgress, { safeEmitProgress(onProgress, {
stage: "error", stage: "error",
percent: null, percent: null,
@ -920,6 +921,7 @@ export async function installLatestUpdate(
return { started: false, message: check.error }; return { started: false, message: check.error };
} }
if (!check.updateAvailable) { if (!check.updateAvailable) {
activeUpdateAbortController = null;
safeEmitProgress(onProgress, { safeEmitProgress(onProgress, {
stage: "error", stage: "error",
percent: null, percent: null,
@ -962,6 +964,14 @@ export async function installLatestUpdate(
let candidates = buildDownloadCandidates(safeRepo, effectiveCheck); let candidates = buildDownloadCandidates(safeRepo, effectiveCheck);
if (candidates.length === 0) { if (candidates.length === 0) {
activeUpdateAbortController = null;
safeEmitProgress(onProgress, {
stage: "error",
percent: null,
downloadedBytes: 0,
totalBytes: null,
message: "Setup-Asset nicht gefunden"
});
return { started: false, message: "Setup-Asset nicht gefunden" }; return { started: false, message: "Setup-Asset nicht gefunden" };
} }