Release v1.6.20
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
b8bbc9c32f
commit
729aa30253
@@ -4191,7 +4191,11 @@ export class DownloadManager extends EventEmitter {
|
||||
return;
|
||||
}
|
||||
|
||||
this.consecutiveReconnects += 1;
|
||||
// Only increment when not already inside an active reconnect window to avoid
|
||||
// inflating the backoff counter when multiple parallel downloads hit 429/503.
|
||||
if (this.session.reconnectUntil <= nowMs()) {
|
||||
this.consecutiveReconnects += 1;
|
||||
}
|
||||
const backoffMultiplier = Math.min(this.consecutiveReconnects, 5);
|
||||
const waitMs = this.settings.reconnectWaitSeconds * 1000 * backoffMultiplier;
|
||||
const maxWaitMs = this.settings.reconnectWaitSeconds * 2 * 1000;
|
||||
@@ -5037,10 +5041,6 @@ export class DownloadManager extends EventEmitter {
|
||||
if (responseText && responseText !== "Unbekannter Fehler" && !/(^|\b)http\s*\d{3}\b/i.test(responseText)) {
|
||||
lastError = `HTTP ${response.status}: ${responseText}`;
|
||||
}
|
||||
if (this.settings.autoReconnect && [429, 503].includes(response.status)) {
|
||||
this.requestReconnect(`HTTP ${response.status}`);
|
||||
throw new Error(lastError);
|
||||
}
|
||||
if (attempt < maxAttempts) {
|
||||
item.retries += 1;
|
||||
item.fullStatus = `Serverfehler ${response.status}, retry ${attempt}/${retryDisplayLimit}`;
|
||||
@@ -5048,6 +5048,10 @@ export class DownloadManager extends EventEmitter {
|
||||
await sleep(retryDelayWithJitter(attempt, 250));
|
||||
continue;
|
||||
}
|
||||
if (this.settings.autoReconnect && [429, 503].includes(response.status)) {
|
||||
this.requestReconnect(`HTTP ${response.status}`);
|
||||
throw new Error(lastError);
|
||||
}
|
||||
throw new Error(lastError);
|
||||
}
|
||||
|
||||
|
||||
+15
-4
@@ -466,7 +466,7 @@ export function classifyExtractionError(errorText: string): ExtractErrorCategory
|
||||
|
||||
function isExtractAbortError(errorText: string): boolean {
|
||||
const text = String(errorText || "").toLowerCase();
|
||||
return text.includes("aborted:extract") || text.includes("extract_aborted");
|
||||
return text.includes("aborted:extract") || text.includes("extract_aborted") || text.includes("noextractor:skipped");
|
||||
}
|
||||
|
||||
export function archiveFilenamePasswords(archiveName: string): string[] {
|
||||
@@ -872,10 +872,17 @@ function resolveJvmExtractorRootCandidates(): string[] {
|
||||
}
|
||||
|
||||
let cachedJvmLayout: JvmExtractorLayout | null | undefined;
|
||||
let cachedJvmLayoutNullSince = 0;
|
||||
const JVM_LAYOUT_NULL_TTL_MS = 5 * 60 * 1000;
|
||||
|
||||
function resolveJvmExtractorLayout(): JvmExtractorLayout | null {
|
||||
if (cachedJvmLayout !== undefined) {
|
||||
return cachedJvmLayout;
|
||||
// Don't cache null permanently — retry after TTL in case Java was installed
|
||||
if (cachedJvmLayout === null && Date.now() - cachedJvmLayoutNullSince > JVM_LAYOUT_NULL_TTL_MS) {
|
||||
cachedJvmLayout = undefined;
|
||||
} else {
|
||||
return cachedJvmLayout;
|
||||
}
|
||||
}
|
||||
const javaCandidates = resolveJavaCommandCandidates();
|
||||
const javaCommand = javaCandidates.find((candidate) => {
|
||||
@@ -908,6 +915,7 @@ function resolveJvmExtractorLayout(): JvmExtractorLayout | null {
|
||||
}
|
||||
|
||||
cachedJvmLayout = null;
|
||||
cachedJvmLayoutNullSince = Date.now();
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1958,9 +1966,12 @@ export async function extractPackageArchives(options: ExtractOptions): Promise<{
|
||||
let noExtractorEncountered = false;
|
||||
|
||||
const extractSingleArchive = async (archivePath: string): Promise<void> => {
|
||||
if (options.signal?.aborted || noExtractorEncountered) {
|
||||
if (options.signal?.aborted) {
|
||||
throw new Error("aborted:extract");
|
||||
}
|
||||
if (noExtractorEncountered) {
|
||||
throw new Error("noextractor:skipped");
|
||||
}
|
||||
const archiveName = path.basename(archivePath);
|
||||
const archiveResumeKey = archiveNameKey(archiveName);
|
||||
const archiveStartedAt = Date.now();
|
||||
@@ -2057,11 +2068,11 @@ export async function extractPackageArchives(options: ExtractOptions): Promise<{
|
||||
emitProgress(extracted + failed, archiveName, "extracting", archivePercent, Date.now() - archiveStartedAt);
|
||||
}
|
||||
} catch (error) {
|
||||
failed += 1;
|
||||
const errorText = String(error);
|
||||
if (isExtractAbortError(errorText)) {
|
||||
throw error;
|
||||
}
|
||||
failed += 1;
|
||||
lastError = errorText;
|
||||
const errorCategory = classifyExtractionError(errorText);
|
||||
logger.error(`Entpack-Fehler ${path.basename(archivePath)} [${errorCategory}]: ${errorText}`);
|
||||
|
||||
Reference in New Issue
Block a user