From e9b9801ac111113fce62726292e4024303270ff0 Mon Sep 17 00:00:00 2001 From: Sucukdeluxe Date: Wed, 4 Mar 2026 14:46:44 +0100 Subject: [PATCH] Release v1.6.10 Fix post-process slot counter going negative after stop(), allowing multiple packages to extract simultaneously instead of one at a time. Co-Authored-By: Claude Opus 4.6 --- package.json | 2 +- src/main/download-manager.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 77ab3f2..02b7b91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "real-debrid-downloader", - "version": "1.6.9", + "version": "1.6.10", "description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)", "main": "build/main/main/main.js", "author": "Sucukdeluxe", diff --git a/src/main/download-manager.ts b/src/main/download-manager.ts index 5e2cf41..670d062 100644 --- a/src/main/download-manager.ts +++ b/src/main/download-manager.ts @@ -3525,6 +3525,13 @@ export class DownloadManager extends EventEmitter { } private releasePostProcessSlot(): void { + // Guard: stop() resets active to 0, but old tasks (aborted waiters) still + // call release in their finally blocks. Without this guard, the counter + // goes negative, letting multiple packages through on the next session. + if (this.packagePostProcessActive <= 0) { + this.packagePostProcessActive = 0; + return; + } this.packagePostProcessActive -= 1; if (this.packagePostProcessWaiters.length === 0) return; // Pick the waiter whose package appears earliest in packageOrder