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:
parent
86a358d568
commit
e9b9801ac1
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "1.6.9",
|
"version": "1.6.10",
|
||||||
"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",
|
||||||
|
|||||||
@ -3525,6 +3525,13 @@ export class DownloadManager extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private releasePostProcessSlot(): void {
|
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;
|
this.packagePostProcessActive -= 1;
|
||||||
if (this.packagePostProcessWaiters.length === 0) return;
|
if (this.packagePostProcessWaiters.length === 0) return;
|
||||||
// Pick the waiter whose package appears earliest in packageOrder
|
// Pick the waiter whose package appears earliest in packageOrder
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user