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 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe 2026-03-04 14:46:44 +01:00
parent 86a358d568
commit e9b9801ac1
2 changed files with 8 additions and 1 deletions

View File

@ -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",

View File

@ -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