fix(aria2): harden per-transfer DNS fallback (issue #35)

This commit is contained in:
NimBold
2026-08-05 19:28:56 +03:30
parent 4a83ac97c7
commit c1202229ac
27 changed files with 864 additions and 27 deletions
+7 -1
View File
@@ -200,7 +200,11 @@ const startDownloadListeners = async () => {
? { totalIsEstimate: progress.total_is_estimate }
: {})
} : {}),
...(payload.error ? { lastError: payload.error } : {}),
...(payload.error ? {
lastError: payload.error,
lastErrorKind: payload.errorKind,
lastResolverFallback: payload.resolverFallback,
} : {}),
...((status === 'downloading' || status === 'verifying' || status === 'retrying')
? { lastTry: new Date().toISOString() }
: {})
@@ -212,6 +216,8 @@ const startDownloadListeners = async () => {
}
if (!payload.error && status !== 'failed' && status !== 'retrying') {
updates.lastError = undefined;
updates.lastErrorKind = undefined;
updates.lastResolverFallback = undefined;
}
if (payload.fileName && payload.fileName !== current.fileName) {
updates.fileName = payload.fileName;